Skip to content

Commit f56663f

Browse files
Merge pull request #6 from Theqwertypusher/feature
(added) duplicate snapshot check in background.js
2 parents 7205047 + 62ca485 commit f56663f

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
@@ -305,6 +305,11 @@ chrome.runtime.onMessage.addListener((request, sender) => {
305305
break;
306306
}
307307

308+
// DUPLICATE SNAPSHOT CHECK
309+
const previousSnap = tabsObj[tabId].currLocation.stateSnapshot.children[0].componentData.actualDuration;
310+
const incomingSnap = request.payload.children[0].componentData.actualDuration;
311+
if (previousSnap === incomingSnap) break;
312+
308313
// don't add anything to snapshot storage if tab is reloaded for the initial snapshot
309314
if (reloaded[tabId]) {
310315
reloaded[tabId] = false;

0 commit comments

Comments
 (0)