Product Block Editor: clicking outside of the attribute modal triggers an error (#50139)

* Fix clicking outside of the attribute modal triggers an error

* Add changelog file
This commit is contained in:
Maikel Perez 2024-07-31 09:03:39 -04:00 committed by GitHub
parent 045919d107
commit 75d55a4a66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix clicking outside of the attribute modal triggers an error

View File

@ -363,7 +363,7 @@ export const NewAttributeModal: React.FC< NewAttributeModalProps > = ( {
| React.MouseEvent< Element >
| React.FocusEvent< Element >
) => {
if ( ! event.isPropagationStopped() ) {
if ( ! event?.isPropagationStopped() ) {
onCancel();
}
} }