Skip to content

Commit 3ac7c20

Browse files
committed
update to RTK slices
1 parent f8b8177 commit 3ac7c20

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/RTKslices.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const mainSlice = createSlice({
4242
console.log('emptySnapshots: ', current(state));
4343

4444
const { tabs, currentTab, port } = state;
45-
console.log('currentTab exists??: ', tabs[currentTab]);
45+
console.log('currentTab exists??: ', current(tabs[currentTab]));
4646
console.log('port: ', port);
4747

4848
port.postMessage({ action: 'emptySnap', tabId: currentTab });
@@ -58,6 +58,7 @@ export const mainSlice = createSlice({
5858
tabs[currentTab].snapshots = [lastSnapshot];
5959

6060
tabs[currentTab].currLocation = tabs[currentTab].hiearchy;
61+
console.log('tabs[currentTab] is ', current(tabs[currentTab]));
6162
tabs[currentTab].index = 1;
6263
tabs[currentTab].currParent = 0;
6364
tabs[currentTab].currBranch = 1;
@@ -471,7 +472,8 @@ export const mainSlice = createSlice({
471472
seriesArray.push(newSeries);
472473
localStorage.setItem('project', JSON.stringify(seriesArray));
473474
tabs[currentTab] = { ...tabs[currentTab], seriesSavedStatus: 'saved' };
474-
},
475+
}
476+
},
475477
toggleExpanded: (state, action) => {
476478
const { tabs, currentTab } = state;
477479
// find correct node from currLocation and toggle isExpanded

0 commit comments

Comments
 (0)