File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change 86
86
} ) ;
87
87
sysend . track ( 'close' , function ( data ) {
88
88
count ( data . count ) ;
89
- if ( sysend . isPrimary ( ) ) {
89
+ if ( data . count === 1 ) {
90
90
track ( 'close: ' + id ( data . id ) + ', last - become primary' ) ;
91
- } else if ( data . wasPrimary ) {
91
+ } else if ( data . primary ) {
92
92
track ( 'close: ' + id ( data . id ) + ', primary was closed' ) ;
93
93
} else {
94
94
track ( 'close: ' + id ( data . id ) ) ;
Original file line number Diff line number Diff line change 476
476
if ( data . wasPrimary && ! primary ) {
477
477
has_primary = false ;
478
478
}
479
- if ( last ) {
480
- primary = true ;
481
- has_primary = true ;
482
- }
483
479
var payload = {
484
480
id : data . id ,
485
481
count : target_count ,
486
- wasPrimary : data . wasPrimary ,
487
- primary : primary ,
482
+ primary : data . wasPrimary ,
488
483
self : data . id === target_id
489
484
} ;
490
485
trigger ( handlers . close , payload ) ;
491
- if ( primary ) {
492
- trigger ( handlers . primary ) ;
493
- }
494
486
} ) ;
495
487
496
488
sysend . on ( '__window__' , function ( data ) {
You can’t perform that action at this time.
0 commit comments