fix: log error message if <Head> rendering fails (#75)
This commit is contained in:
+2
-1
@@ -10,9 +10,10 @@ export function Head(props: HeadProps) {
|
||||
let context: ComponentChildren[];
|
||||
try {
|
||||
context = useContext(HEAD_CONTEXT);
|
||||
} catch {
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
"<Head> component is not supported in the browser, or during suspense renders.",
|
||||
{ cause: err },
|
||||
);
|
||||
}
|
||||
context.push(props.children);
|
||||
|
||||
Reference in New Issue
Block a user