Consisely describe the issue
In src/theme/NotFound.tsx, there is an incorrect typeof comparison on line 14:
if (typeof window !== undefined) {
Because typeof window always evaluates to a string (either "object" or "undefined"), comparing it to the primitive undefined is always true.
If the project is ever built or rendered in a Server-Side Rendering (SSR) context where window is not defined, the current logic would throw a ReferenceError: window is not defined because it attempts to access window.location.href.
The comparison should check against the string 'undefined'
Upload screenshots or screen recordings
No response
LLM Policy
Consisely describe the issue
In
src/theme/NotFound.tsx, there is an incorrecttypeofcomparison on line 14:if (typeof window !== undefined) {Because
typeof windowalways evaluates to a string (either"object"or"undefined"), comparing it to the primitiveundefinedis always true.If the project is ever built or rendered in a Server-Side Rendering (SSR) context where
windowis not defined, the current logic would throw aReferenceError: window is not definedbecause it attempts to accesswindow.location.href.The comparison should check against the string
'undefined'Upload screenshots or screen recordings
No response
LLM Policy