From c436705b96a2a8351f3509d9b9ec4eeb0052538c Mon Sep 17 00:00:00 2001 From: quenio-lt Date: Wed, 1 Dec 2021 08:19:18 -0300 Subject: [PATCH] fix: log error message if `` rendering fails (#75) --- src/runtime/head.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/head.ts b/src/runtime/head.ts index b90445b1..e7a206a7 100644 --- a/src/runtime/head.ts +++ b/src/runtime/head.ts @@ -10,9 +10,10 @@ export function Head(props: HeadProps) { let context: ComponentChildren[]; try { context = useContext(HEAD_CONTEXT); - } catch { + } catch (err) { throw new Error( " component is not supported in the browser, or during suspense renders.", + { cause: err }, ); } context.push(props.children);