From ad63c4940e80eab01ad2f3d26fb00dd3580fbb8b Mon Sep 17 00:00:00 2001 From: Bero Date: Tue, 12 Nov 2024 08:40:08 +0100 Subject: [PATCH] Don't send error if source is unknown --- packages/playground/website/src/components/layout/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/playground/website/src/components/layout/index.tsx b/packages/playground/website/src/components/layout/index.tsx index b4ebf3bec4..3bcc2de6a5 100644 --- a/packages/playground/website/src/components/layout/index.tsx +++ b/packages/playground/website/src/components/layout/index.tsx @@ -160,7 +160,9 @@ function Modals(blueprint: Blueprint) { useEffect(() => { addCrashListener(logger, (e) => { const error = e as CustomEvent; - logErrorEvent(error.detail?.source); + if (error.detail?.source) { + logErrorEvent(error.detail.source); + } if (error.detail?.source === 'php-wasm') { dispatch(setActiveModal(modalSlugs.ERROR_REPORT));