Skip to content

Commit

Permalink
Merge pull request #20844 from Yoast/1175-trivial-console-error-on-cl…
Browse files Browse the repository at this point in the history
…ick-outside-the-modal
  • Loading branch information
thijsoo authored Nov 13, 2023
2 parents 54f4919 + ed54674 commit e22d8e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { LocationProvider } from "@yoast/externals/contexts";
*/
export const isCloseEvent = ( event ) => {
let shouldClose = true;
if ( event.type === "blur" ) {
if ( event?.type === "blur" ) {
// Catch any blur events that are not supposed to blur to modal, by identifying the clicked item.
const { relatedTarget } = event;

Expand Down

0 comments on commit e22d8e5

Please sign in to comment.