Skip to content

Conversation

@mydea
Copy link
Member

@mydea mydea commented 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

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
@mydea mydea requested review from billyvg and chargome April 2, 2025 12:20
@mydea mydea self-assigned this Apr 2, 2025
@mydea mydea merged commit 6b8c459 into sentry-v2 Apr 2, 2025
15 checks passed
@mydea mydea deleted the fn/check-child-nodes branch April 2, 2025 14:31
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.

Cannot read properties of undefined (in rrweb)

3 participants