@@ -1067,7 +1067,7 @@ class EditorComments extends BaseEditorOption<EditorOption.comments, EditorComme
10671067 }
10681068
10691069 public validate ( _input : any ) : EditorCommentsOptions {
1070- if ( typeof _input !== 'object' ) {
1070+ if ( ! _input || typeof _input !== 'object' ) {
10711071 return this . defaultValue ;
10721072 }
10731073 const input = _input as IEditorCommentsOptions ;
@@ -1312,7 +1312,7 @@ class EditorFind extends BaseEditorOption<EditorOption.find, EditorFindOptions>
13121312 }
13131313
13141314 public validate ( _input : any ) : EditorFindOptions {
1315- if ( typeof _input !== 'object' ) {
1315+ if ( ! _input || typeof _input !== 'object' ) {
13161316 return this . defaultValue ;
13171317 }
13181318 const input = _input as IEditorFindOptions ;
@@ -1538,7 +1538,7 @@ class EditorGoToLocation extends BaseEditorOption<EditorOption.gotoLocation, GoT
15381538 }
15391539
15401540 public validate ( _input : any ) : GoToLocationOptions {
1541- if ( typeof _input !== 'object' ) {
1541+ if ( ! _input || typeof _input !== 'object' ) {
15421542 return this . defaultValue ;
15431543 }
15441544 const input = _input as IGotoLocationOptions ;
@@ -1616,7 +1616,7 @@ class EditorHover extends BaseEditorOption<EditorOption.hover, EditorHoverOption
16161616 }
16171617
16181618 public validate ( _input : any ) : EditorHoverOptions {
1619- if ( typeof _input !== 'object' ) {
1619+ if ( ! _input || typeof _input !== 'object' ) {
16201620 return this . defaultValue ;
16211621 }
16221622 const input = _input as IEditorHoverOptions ;
@@ -2042,7 +2042,7 @@ class EditorLightbulb extends BaseEditorOption<EditorOption.lightbulb, EditorLig
20422042 }
20432043
20442044 public validate ( _input : any ) : EditorLightbulbOptions {
2045- if ( typeof _input !== 'object' ) {
2045+ if ( ! _input || typeof _input !== 'object' ) {
20462046 return this . defaultValue ;
20472047 }
20482048 const input = _input as IEditorLightbulbOptions ;
@@ -2186,7 +2186,7 @@ class EditorMinimap extends BaseEditorOption<EditorOption.minimap, EditorMinimap
21862186 }
21872187
21882188 public validate ( _input : any ) : EditorMinimapOptions {
2189- if ( typeof _input !== 'object' ) {
2189+ if ( ! _input || typeof _input !== 'object' ) {
21902190 return this . defaultValue ;
21912191 }
21922192 const input = _input as IEditorMinimapOptions ;
@@ -2261,7 +2261,7 @@ class EditorPadding extends BaseEditorOption<EditorOption.padding, InternalEdito
22612261 }
22622262
22632263 public validate ( _input : any ) : InternalEditorPaddingOptions {
2264- if ( typeof _input !== 'object' ) {
2264+ if ( ! _input || typeof _input !== 'object' ) {
22652265 return this . defaultValue ;
22662266 }
22672267 const input = _input as IEditorPaddingOptions ;
@@ -2319,7 +2319,7 @@ class EditorParameterHints extends BaseEditorOption<EditorOption.parameterHints,
23192319 }
23202320
23212321 public validate ( _input : any ) : InternalParameterHintOptions {
2322- if ( typeof _input !== 'object' ) {
2322+ if ( ! _input || typeof _input !== 'object' ) {
23232323 return this . defaultValue ;
23242324 }
23252325 const input = _input as IEditorParameterHintOptions ;
@@ -2409,7 +2409,7 @@ class EditorQuickSuggestions extends BaseEditorOption<EditorOption.quickSuggesti
24092409 if ( typeof _input === 'boolean' ) {
24102410 return _input ;
24112411 }
2412- if ( typeof _input === 'object' ) {
2412+ if ( _input && typeof _input === 'object' ) {
24132413 const input = _input as IQuickSuggestionsOptions ;
24142414 const opts = {
24152415 other : EditorBooleanOption . boolean ( input . other , this . defaultValue . other ) ,
@@ -2559,7 +2559,7 @@ class EditorRulers extends BaseEditorOption<EditorOption.rulers, IRulerOption[]>
25592559 column : EditorIntOption . clampedInt ( _element , 0 , 0 , 10000 ) ,
25602560 color : null
25612561 } ) ;
2562- } else if ( typeof _element === 'object' ) {
2562+ } else if ( _element && typeof _element === 'object' ) {
25632563 const element = _element as IRulerOption ;
25642564 rulers . push ( {
25652565 column : EditorIntOption . clampedInt ( element . column , 0 , 0 , 10000 ) ,
@@ -2693,7 +2693,7 @@ class EditorScrollbar extends BaseEditorOption<EditorOption.scrollbar, InternalE
26932693 }
26942694
26952695 public validate ( _input : any ) : InternalEditorScrollbarOptions {
2696- if ( typeof _input !== 'object' ) {
2696+ if ( ! _input || typeof _input !== 'object' ) {
26972697 return this . defaultValue ;
26982698 }
26992699 const input = _input as IEditorScrollbarOptions ;
@@ -3114,7 +3114,7 @@ class EditorSuggest extends BaseEditorOption<EditorOption.suggest, InternalSugge
31143114 }
31153115
31163116 public validate ( _input : any ) : InternalSuggestOptions {
3117- if ( typeof _input !== 'object' ) {
3117+ if ( ! _input || typeof _input !== 'object' ) {
31183118 return this . defaultValue ;
31193119 }
31203120 const input = _input as ISuggestOptions ;
0 commit comments