Skip to content

fix: safer removeChild by checking parent node #1130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

encloinc
Copy link

This PR contains a:

  • [+ ] bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

I got fed up with nextjs throwing this error:

runtime Error


Error: Cannot read properties of null (reading 'removeChild')

Call Stack
1

Hide 1 ignore-listed frame(s)
HTMLLinkElement.eval
node_modules\next\dist\compiled\mini-css-extract-plugin\hmr\hotModuleReplacement.js (1:1137)

So I patched the minified file to check if parentNode is null (which fixed the issue) and im uploading the patch here.

Breaking Changes

Additional Info

Copy link

CLA Not Signed

evenstensberg
evenstensberg previously approved these changes Jun 19, 2025
@evenstensberg
Copy link
Member

Thanks for the contribution ❤️ ! Could you sign the CLA?

@evenstensberg evenstensberg self-requested a review June 19, 2025 18:20
@evenstensberg evenstensberg dismissed their stale review June 19, 2025 18:20

ci needs to pass first

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.

2 participants