File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -303,6 +303,7 @@ export async function reopen(
303
303
304
304
// Fix tree
305
305
let treeUpdateNeeded = false
306
+ const toSave : Tab [ ] = [ ]
306
307
for ( const oldId of Object . keys ( treeUpdate ) ) {
307
308
const children = treeUpdate [ oldId ]
308
309
const newId = idsMap [ oldId ]
@@ -311,10 +312,14 @@ export async function reopen(
311
312
if ( ! treeUpdateNeeded ) treeUpdateNeeded = true
312
313
for ( const childId of children ) {
313
314
const childTab = Tabs . byId [ childId ]
314
- if ( childTab ) childTab . parentId = newId
315
+ if ( childTab ) {
316
+ childTab . parentId = newId
317
+ toSave . push ( childTab )
318
+ }
315
319
}
316
320
}
317
321
if ( treeUpdateNeeded ) Tabs . updateTabsTree ( minIndex , maxIndex + 1 )
322
+ if ( toSave . length ) toSave . forEach ( t => Tabs . saveTabData ( t . id ) )
318
323
}
319
324
320
325
export async function open (
You can’t perform that action at this time.
0 commit comments