Skip to content

Commit 6ed2126

Browse files
committed
added more comments about emptySnap action
1 parent 72ae712 commit 6ed2126

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/extension/background.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ chrome.runtime.onConnect.addListener((port) => {
270270
// resets hierarchy to page last state recorded
271271
...tabsObj[tabId].snapshots[0],
272272
};
273-
tabsObj[tabId].axSnapshots =
274-
tabsObj[tabId].axSnapshots[tabsObj[tabId].axSnapshots.length - 1];
273+
tabsObj[tabId].axSnapshots = tabsObj[tabId].axSnapshots[0];
275274
tabsObj[tabId].hierarchy.axSnapshot = tabsObj[tabId].axSnapshots[0]; //what about other hierarchy properties? Shouldn't those be reset as well?
276275
// other hierarchy properties do not have to be set because you maintain the root history node
277276
tabsObj[tabId].currLocation = tabsObj[tabId].hierarchy; // resets currLocation to page last state recorded

0 commit comments

Comments
 (0)