fix(tracker): 12 0 2 fix for canvas check
This commit is contained in:
parent
e0dfa21306
commit
1035a1a219
3 changed files with 9 additions and 3 deletions
|
|
@ -1,3 +1,7 @@
|
|||
# 12.0.2
|
||||
|
||||
- fix for canvas snapshot check
|
||||
|
||||
# 12.0.1
|
||||
|
||||
- pause canvas snapshotting when its offscreen
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "12.0.1",
|
||||
"version": "12.0.2",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class CanvasRecorder {
|
|||
entries.forEach((entry) => {
|
||||
if (entry.isIntersecting) {
|
||||
if (entry.target) {
|
||||
if (this.snapshots[id].createdAt) {
|
||||
if (this.snapshots[id] && this.snapshots[id].createdAt) {
|
||||
this.snapshots[id].paused = false
|
||||
} else {
|
||||
this.recordCanvas(entry.target, id)
|
||||
|
|
@ -67,7 +67,9 @@ class CanvasRecorder {
|
|||
* */
|
||||
// observer.unobserve(entry.target)
|
||||
} else {
|
||||
this.snapshots[id].paused = true
|
||||
if (this.snapshots[id]) {
|
||||
this.snapshots[id].paused = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue