diff options
author | 2021-10-25 17:06:20 -0700 | |
---|---|---|
committer | 2021-10-25 17:06:20 -0700 | |
commit | e7f191c08b3d358ac72828c84eb0398f282d7b11 (patch) | |
tree | e73adca59481eae499ad6f8b503e7261344a57b2 /packages | |
parent | 6a2372b0b2260165d9cde53ec1163265dab54fc8 (diff) | |
download | bun-e7f191c08b3d358ac72828c84eb0398f282d7b11.tar.gz bun-e7f191c08b3d358ac72828c84eb0398f282d7b11.tar.zst bun-e7f191c08b3d358ac72828c84eb0398f282d7b11.zip |
[HTTP] Fix error handling modal from showing when there are no errors
Diffstat (limited to 'packages')
-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} /> |