File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -51,12 +51,14 @@ class ExtensionsManager extends EventEmitter {
5151 this . availableExtensions = [ ] ;
5252
5353 let autodiscover = false ;
54- if ( this . kites . options . discover === 'undefined' ) {
54+ if ( typeof this . kites . options . discover === 'undefined' ) {
5555 this . kites . options . discover = [ false , 0 ] ;
5656 } else if ( typeof this . kites . options . discover === 'boolean' ) {
5757 this . kites . options . discover = [ this . kites . options . discover , 2 , this . kites . options . appDirectory ] ;
5858 } else if ( typeof this . kites . options . discover === 'string' ) {
5959 this . kites . options . discover = [ true , 2 , this . kites . options . discover ] ;
60+ } else if ( this . kites . options . discover . length < 2 ) {
61+ throw new Error ( 'Discover options as array requires at least 2 elements! Example: [true, 2]' ) ;
6062 }
6163
6264 // autodiscover extensions
You can’t perform that action at this time.
0 commit comments