feat(session-replay): add background-capture support for Zoning/heatm…#1505
feat(session-replay): add background-capture support for Zoning/heatm…#1505
Conversation
Add background capture support for Zoning/heatmaps by initializing
|
| }, | ||
| { once: true }, | ||
| ); | ||
| document.head?.appendChild(scriptElement); |
There was a problem hiding this comment.
If document.head is null, the optional chaining silently skips appendChild, leaving the promise pending forever. Consider removing ?. so the try/catch can reject the promise on failure.
| document.head?.appendChild(scriptElement); | |
| document.head.appendChild(scriptElement); |
🚀 Want me to fix this? Reply ex: "fix it for me".
2fcdd6e to
f9b440d
Compare
… deprecated options
| const message = event.data as Message<Action>; | ||
| const { action, requestId, data } = message; |
There was a problem hiding this comment.
Destructuring event.data will throw if the message is null or undefined. Consider adding a guard (e.g., if (!event.data) return) before destructuring.
| const message = event.data as Message<Action>; | |
| const { action, requestId, data } = message; | |
| const message = event.data as Message<Action>; | |
| if (!message) { | |
| return; | |
| } | |
| const { action, requestId, data } = message; |
🚀 Want me to fix this? Reply ex: "fix it for me".
…ap integration
Summary
Checklist