-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cannot read properties of undefined (in rrweb) #15948
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
Closed
3 tasks done
Comments
Hi, thanks for investigating and filing this! Would you like to contribute this and open up a PR? No pressure, we can also take care of that. |
Hmm, technically speaking we should do I'll see if we can fix this easily... |
mydea
added a commit
to getsentry/rrweb
that referenced
this issue
Apr 2, 2025
See https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes#simple_usage This is typed weirdly, because apparently you should check for existence here. Technically doing `node.hasChildNodes()` would be correct, but since we tend to serialize stuff here or there I feel this is safer (and we already do that in other places too). Closes getsentry/sentry-javascript#15948
Closed by getsentry/rrweb#244 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/react
SDK Version
9.10.1
Framework Version
React 18.3.1
Link to Sentry event
N/A
Reproduction Example/SDK Setup
No response
Steps to Reproduce
Hard to reproduce, but it seems to be related to a third-party utility that makes changes to the DOM.
It results in an error in the browser console pointing to a
genAdds
function, which I'm pretty sure is this line.I think adding a check that
n.childNodes
is defined should do the trick:Expected Result
No error in the console
Actual Result
error in the console
The text was updated successfully, but these errors were encountered: