Skip to content

Commit 19ccfc4

Browse files
committed
removed unnecessary deep copies in background.js for emptySnap for clear button
1 parent d6a9ca1 commit 19ccfc4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/extension/background.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,9 @@ chrome.runtime.onConnect.addListener((port) => {
366366
...tabsObj[tabId].snapshots[0],
367367
};
368368
tabsObj[tabId].axSnapshots = [
369-
JSON.parse(JSON.stringify(tabsObj[tabId].axSnapshots[tabsObj[tabId].currLocation.index])),
369+
tabsObj[tabId].axSnapshots[tabsObj[tabId].currLocation.index],
370370
]; // resets axSnapshots to current page state
371-
tabsObj[tabId].hierarchy.axSnapshot = JSON.parse(
372-
JSON.stringify(tabsObj[tabId].axSnapshots[0]),
373-
); // resets hierarchy to ax tree of current page state
371+
tabsObj[tabId].hierarchy.axSnapshot = tabsObj[tabId].axSnapshots[0]; // resets hierarchy to ax tree of current page state
374372
tabsObj[tabId].index = 1; //reset index
375373
tabsObj[tabId].currParent = 0; // reset currParent
376374
tabsObj[tabId].currBranch = 1; // reset currBranch

0 commit comments

Comments
 (0)