Skip to content

Commit 62ca485

Browse files
(added) duplicate snapshot check in background.js
1 parent 2f5c1f2 commit 62ca485

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/extension/background.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,11 @@ chrome.runtime.onMessage.addListener((request, sender) => {
298298
break;
299299
}
300300

301+
// DUPLICATE SNAPSHOT CHECK
302+
const previousSnap = tabsObj[tabId].currLocation.stateSnapshot.children[0].componentData.actualDuration;
303+
const incomingSnap = request.payload.children[0].componentData.actualDuration;
304+
if (previousSnap === incomingSnap) break;
305+
301306
// don't add anything to snapshot storage if tab is reloaded for the initial snapshot
302307
if (reloaded[tabId]) {
303308
reloaded[tabId] = false;

0 commit comments

Comments
 (0)