nested not-found.tsx
page does not execute script defined in layout.tsx
#64706
Labels
bug
Issue was opened via the bug report template.
Link to the code that reproduces this issue
https://github.com/stefanprobst/issue-next-not-found
To Reproduce
git clone git@github.com:stefanprobst/issue-next-not-found.git && cd issue-next-not-found
pnpm install && pnpm run dev
app/not-found.tsx
) with a dark backgroundapp/[locale]/not-found.tsx
) with a light background, because the color-scheme script inapp/[locale]/layout.tsx
did not add the data attribute to thehtml
element.Current vs. Expected behavior
i expect the data attribute added to the
<html>
element by the script inapp/[locale]/layout.tsx
to not be lost whennotFound()
is called and theapp/[locale]/not-found.tsx
page is displayed.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 Available memory (MB): 32032 Available CPU cores: 4 Binaries: Node: 20.12.2 npm: 10.5.0 Yarn: 1.22.19 pnpm: 8.15.5 Relevant Packages: next: 14.3.0-canary.9 // Latest available version is detected (14.3.0-canary.9). eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.5 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: