@@ -42,7 +42,7 @@ export const mainSlice = createSlice({
42
42
console . log ( 'emptySnapshots: ' , current ( state ) ) ;
43
43
44
44
const { tabs, currentTab, port } = state ;
45
- console . log ( 'currentTab exists??: ' , tabs [ currentTab ] ) ;
45
+ console . log ( 'currentTab exists??: ' , current ( tabs [ currentTab ] ) ) ;
46
46
console . log ( 'port: ' , port ) ;
47
47
48
48
port . postMessage ( { action : 'emptySnap' , tabId : currentTab } ) ;
@@ -58,6 +58,7 @@ export const mainSlice = createSlice({
58
58
tabs [ currentTab ] . snapshots = [ lastSnapshot ] ;
59
59
60
60
tabs [ currentTab ] . currLocation = tabs [ currentTab ] . hiearchy ;
61
+ console . log ( 'tabs[currentTab] is ' , current ( tabs [ currentTab ] ) ) ;
61
62
tabs [ currentTab ] . index = 1 ;
62
63
tabs [ currentTab ] . currParent = 0 ;
63
64
tabs [ currentTab ] . currBranch = 1 ;
@@ -471,7 +472,8 @@ export const mainSlice = createSlice({
471
472
seriesArray . push ( newSeries ) ;
472
473
localStorage . setItem ( 'project' , JSON . stringify ( seriesArray ) ) ;
473
474
tabs [ currentTab ] = { ...tabs [ currentTab ] , seriesSavedStatus : 'saved' } ;
474
- } ,
475
+ }
476
+ } ,
475
477
toggleExpanded : ( state , action ) => {
476
478
const { tabs, currentTab } = state ;
477
479
// find correct node from currLocation and toggle isExpanded
0 commit comments