File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ const _apiProps = {
5050 return new ( Promise ) ( resolve => { this . one ( '_onFlushEffects' , function ( ) { resolve . apply ( this , arguments ) ; } ) ; } ) ;
5151 } ,
5252 select : function ( id = missingParamEr ( 'select' ) ) {
53- id = id + '' ; //make sure id is string
53+ if ( id )
54+ id = id + '' ; //make sure id is string
5455 const result = this . _getOnChangePromise ( ) ;
5556 this . _select ( id ) ;
5657 return result ;
@@ -84,7 +85,8 @@ const _apiProps = {
8485 return this ;
8586 } ,
8687 open : function ( tabObj = missingParamEr ( 'open' ) ) {
87- tabObj . id = tabObj . id + '' ; //make sure id is string
88+ if ( tabObj . id )
89+ tabObj . id = tabObj . id + '' ; //make sure id is string
8890 const result = this . _getOnChangePromise ( ) ;
8991 this . _open ( tabObj . id ) ;
9092 this . _addTab ( tabObj , { defaultPanelComponent : this . getOption ( 'defaultPanelComponent' ) } ) ;
@@ -97,7 +99,8 @@ const _apiProps = {
9799 return result ;
98100 } ,
99101 close : function ( id = missingParamEr ( 'close' ) ) {
100- id = id + '' ; //make sure id is string
102+ if ( id )
103+ id = id + '' ; //make sure id is string
101104 if ( this . isSelected ( id ) ) {
102105 const _openTabsId = [ ...this . stateRef . openTabIDs ] ;
103106 _openTabsId . splice ( _openTabsId . indexOf ( id ) , 1 ) ;
You can’t perform that action at this time.
0 commit comments