Skip to content

Commit aa3422a

Browse files
authored
always allow to close the error overlay (vercel/turborepo#3624)
It's difficult to test an app, if a single error blocks using the whole page. Therefore, error overlay should always be closeable.
1 parent bb0977c commit aa3422a

File tree

1 file changed

+4
-1
lines changed
  • packages/next-swc/crates/next-core/js/src/overlay/internal/container

1 file changed

+4
-1
lines changed

packages/next-swc/crates/next-core/js/src/overlay/internal/container/Errors.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ export function Errors({ issues, errors }: ErrorsProps) {
182182
const hasServerError = readyErrors.some((err) =>
183183
["server", "edge-server"].includes(getErrorSource(err.error) || "")
184184
);
185-
const isClosable = !isLoading && !hasIssueWithError && !hasServerError;
185+
186+
// TODO for now it's already closable, but in future we might want to block users from using a broken app
187+
// const isClosable = !isLoading && !hasIssueWithError && !hasServerError;
188+
const isClosable = true;
186189

187190
const defaultTab =
188191
hasIssueWithError || !hasErrors

0 commit comments

Comments
 (0)