Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #51 from WordPress/fix/missing-context-error
Browse files Browse the repository at this point in the history
Fix missing context error
  • Loading branch information
cbravobernal authored Aug 8, 2022
2 parents 564639c + b81e73b commit 2a15bce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gutenberg-packages/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class WpBlock extends HTMLElement {
cancelable: true,
});
this.dispatchEvent(event);
Providers.push(event.detail.Provider);
if (typeof event.detail.Provider === 'function') {
Providers.push(event.detail.Provider);
}
});

// Share the React Context with their children.
Expand Down

0 comments on commit 2a15bce

Please sign in to comment.