File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,12 @@ class SettingsApp {
81
81
// Set view state of advanced settings and add event
82
82
const oldState : any = this . vsCodeApi . getState ( ) ;
83
83
const advancedShown : boolean = oldState && oldState . advancedShown ;
84
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
85
- document . getElementById ( elementId . advancedSection ) ! . style . display = advancedShown ? "block" : "none" ;
84
+
85
+ const advancedSection : HTMLElement | null = document . getElementById ( elementId . advancedSection ) ;
86
+ if ( advancedSection ) {
87
+ advancedSection . style . display = advancedShown ? "block" : "none" ;
88
+ }
89
+
86
90
document . getElementById ( elementId . showAdvanced ) ?. classList . toggle ( advancedShown ? "collapse" : "expand" , true ) ;
87
91
document . getElementById ( elementId . showAdvanced ) ?. addEventListener ( "click" , this . onShowAdvanced . bind ( this ) ) ;
88
92
this . vsCodeApi . postMessage ( {
You can’t perform that action at this time.
0 commit comments