File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ const _apiProps = {
50
50
return new ( Promise ) ( resolve => { this . one ( '_onFlushEffects' , function ( ) { resolve . apply ( this , arguments ) ; } ) ; } ) ;
51
51
} ,
52
52
select : function ( id = missingParamEr ( 'select' ) ) {
53
+ id = id + '' ; //make sure id is string
53
54
const result = this . _getOnChangePromise ( ) ;
54
55
this . _select ( id ) ;
55
56
return result ;
@@ -83,6 +84,7 @@ const _apiProps = {
83
84
return this ;
84
85
} ,
85
86
open : function ( tabObj = missingParamEr ( 'open' ) ) {
87
+ tabObj . id = tabObj . id + '' ; //make sure id is string
86
88
const result = this . _getOnChangePromise ( ) ;
87
89
this . _open ( tabObj . id ) ;
88
90
this . _addTab ( tabObj , { defaultPanelComponent : this . getOption ( 'defaultPanelComponent' ) } ) ;
@@ -95,6 +97,7 @@ const _apiProps = {
95
97
return result ;
96
98
} ,
97
99
close : function ( id = missingParamEr ( 'close' ) ) {
100
+ id = id + '' ; //make sure id is string
98
101
if ( this . isSelected ( id ) ) {
99
102
const _openTabsId = [ ...this . stateRef . openTabIDs ] ;
100
103
_openTabsId . splice ( _openTabsId . indexOf ( id ) , 1 ) ;
You can’t perform that action at this time.
0 commit comments