From b81e73b41ccee9cb937197067805fc5356cf83be Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 8 Aug 2022 17:36:38 +0200 Subject: [PATCH] Fix missing context error --- src/gutenberg-packages/frontend.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gutenberg-packages/frontend.js b/src/gutenberg-packages/frontend.js index 885b4fb9..db3ba70f 100644 --- a/src/gutenberg-packages/frontend.js +++ b/src/gutenberg-packages/frontend.js @@ -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.