diff --git a/static/js/tree.js b/static/js/tree.js index 1afad4a..ac6be15 100644 --- a/static/js/tree.js +++ b/static/js/tree.js @@ -3,11 +3,11 @@ import { navigationMap } from "/navmap.js"; const branchStateKey = "treehouse.openBranches"; -let branchState = JSON.parse(localStorage.getItem(branchStateKey)) || {}; +let branchState = JSON.parse(sessionStorage.getItem(branchStateKey)) || {}; function saveBranchIsOpen(branchID, state) { branchState[branchID] = state; - localStorage.setItem(branchStateKey, JSON.stringify(branchState)); + sessionStorage.setItem(branchStateKey, JSON.stringify(branchState)); } function branchIsOpen(branchID) {