diff options
Diffstat (limited to 'packages/bun-error/index.tsx')
-rw-r--r-- | packages/bun-error/index.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/bun-error/index.tsx b/packages/bun-error/index.tsx index 4289df065..f0943b8c1 100644 --- a/packages/bun-error/index.tsx +++ b/packages/bun-error/index.tsx @@ -756,7 +756,7 @@ function renderWithFunc(func) { reactRoot.style.visibility = "visible"; }; - const shadowRoot = root.attachShadow({ mode: "open" }); + const shadowRoot = root.attachShadow({ mode: "closed" }); shadowRoot.appendChild(link); shadowRoot.appendChild(reactRoot); @@ -768,6 +768,9 @@ function renderWithFunc(func) { } export function renderFallbackError(fallback: FallbackMessageContainer) { + // Not an error + if (fallback?.problems?.name === "JSDisabled") return; + return renderWithFunc(() => ( <ErrorGroupContext.Provider value={fallback}> <OverlayMessageContainer {...fallback} /> |