Skip to content

Commit

Permalink
[Block Editor]: Fix onHover errors at BlockPattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jan 26, 2023
1 parent 4b77cda commit 270497f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function BlockPattern( {
onDragStart={ ( event ) => {
setIsDragging( true );
if ( onDragStart ) {
onHover( null );
onHover?.( null );
onDragStart( event );
}
} }
Expand All @@ -73,15 +73,15 @@ function BlockPattern( {
className="block-editor-block-patterns-list__item"
onClick={ () => {
onClick( pattern, blocks );
onHover( null );
onHover?.( null );
} }
onMouseEnter={ () => {
if ( isDragging ) {
return;
}
onHover( pattern );
onHover?.( pattern );
} }
onMouseLeave={ () => onHover( null ) }
onMouseLeave={ () => onHover?.( null ) }
aria-label={ pattern.title }
aria-describedby={
pattern.description ? descriptionId : undefined
Expand Down

0 comments on commit 270497f

Please sign in to comment.