Skip to content

Commit

Permalink
Avoid calling onDeselect if item’s value is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed May 9, 2024
1 parent 7a960f1 commit 753a8bf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function useToolsPanelItem(
onSelect?.();
}

if ( ! isMenuItemChecked && wasMenuItemChecked ) {
if ( ! isMenuItemChecked && isValueSet && wasMenuItemChecked ) {
onDeselect?.();
}
}, [
Expand Down

0 comments on commit 753a8bf

Please sign in to comment.