Skip to content

Commit 959652e

Browse files
committed
simplify code
1 parent ac05aa7 commit 959652e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nextjs/src/common/nextNavigationErrorUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { isError } from '@sentry/utils';
77
export function isNotFoundNavigationError(subject: unknown): boolean {
88
return (
99
isError(subject) &&
10-
((subject as Error & { digest?: unknown }).digest === 'NEXT_NOT_FOUND' ||
11-
// this was introduced in 15.0.4-canary.18: https://github.com/vercel/next.js/pull/72774
12-
(subject as Error & { digest?: unknown }).digest === 'NEXT_HTTP_ERROR_FALLBACK;404')
10+
['NEXT_NOT_FOUND', 'NEXT_HTTP_ERROR_FALLBACK;404'].includes(
11+
(subject as Error & { digest?: unknown }).digest as string,
12+
)
1313
);
1414
}
1515

0 commit comments

Comments
 (0)