Skip to content

fix(theme): fix null reference error by executing theme script after DOM loads#32

Closed
Moamal-2000 wants to merge 1 commit into
ry:mainfrom
Moamal-2000:main
Closed

fix(theme): fix null reference error by executing theme script after DOM loads#32
Moamal-2000 wants to merge 1 commit into
ry:mainfrom
Moamal-2000:main

Conversation

@Moamal-2000
Copy link
Copy Markdown

What does this PR do?

This PR resolves a runtime reference error in which the theme initialization script executed before the body element was fully parsed and available in the DOM. By moving the inline script from the <head> element to the end of the <body> element, we guarantee that document.body is fully instantiated before the script attempts to read or modify its class list.

…ensure body class is applied correctly in layout.tsx file
@Moamal-2000
Copy link
Copy Markdown
Author

Closing this PR as it was accidentally opened from the main branch.
Re-opening a clean PR from a dedicated feature branch #33.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant