File tree 1 file changed +22
-20
lines changed
browser/components/sessionstore 1 file changed +22
-20
lines changed Original file line number Diff line number Diff line change @@ -6532,27 +6532,29 @@ var SessionStoreInternal = {
6532
6532
activeIndex = Math . min ( activeIndex , tabState . entries . length - 1 ) ;
6533
6533
activeIndex = Math . max ( activeIndex , 0 ) ;
6534
6534
6535
- let title =
6536
- tabState . entries [ activeIndex ] . title ||
6537
- tabState . entries [ activeIndex ] . url ;
6538
-
6539
- let tabData = {
6540
- state : tabState ,
6541
- title,
6542
- image : tabState . image ,
6543
- pos : tIndex ,
6544
- closedAt : Date . now ( ) ,
6545
- closedInGroup : false ,
6546
- removeAfterRestore : true ,
6547
- } ;
6535
+ if ( activeIndex in tabState . entries ) {
6536
+ let title =
6537
+ tabState . entries [ activeIndex ] . title ||
6538
+ tabState . entries [ activeIndex ] . url ;
6548
6539
6549
- if ( this . _shouldSaveTabState ( tabState ) ) {
6550
- this . saveClosedTabData (
6551
- window ,
6552
- newWindowState . _closedTabs ,
6553
- tabData ,
6554
- false
6555
- ) ;
6540
+ let tabData = {
6541
+ state : tabState ,
6542
+ title,
6543
+ image : tabState . image ,
6544
+ pos : tIndex ,
6545
+ closedAt : Date . now ( ) ,
6546
+ closedInGroup : false ,
6547
+ removeAfterRestore : true ,
6548
+ } ;
6549
+
6550
+ if ( this . _shouldSaveTabState ( tabState ) ) {
6551
+ this . saveClosedTabData (
6552
+ window ,
6553
+ newWindowState . _closedTabs ,
6554
+ tabData ,
6555
+ false
6556
+ ) ;
6557
+ }
6556
6558
}
6557
6559
}
6558
6560
tIndex ++ ;
You can’t perform that action at this time.
0 commit comments