Skip to content

Commit

Permalink
fix(rrweb): null check for pointer (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
michellewzhang authored Jun 18, 2024
1 parent 628fa81 commit 011bd05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rrweb/src/replay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,7 @@ export class Replayer {
private drawMouseTail(position: { x: number; y: number }, pointerId: number) {
const pointer = this.pointers[pointerId];

if (!pointer.mouseTail) {
if (!pointer || !pointer.mouseTail) {
return;
}

Expand All @@ -2189,7 +2189,7 @@ export class Replayer {
: Object.assign({}, defaultMouseTailConfig, this.config.mouseTail);

const draw = () => {
if (!pointer.mouseTail) {
if (!pointer || !pointer.mouseTail) {
return;
}
const mouseTail = pointer.mouseTail;
Expand Down

0 comments on commit 011bd05

Please sign in to comment.