@@ -89,21 +89,21 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
8989 private _isVisible : boolean ;
9090 private selectBoxOptions : ISelectBoxOptions ;
9191 private selectElement : HTMLSelectElement ;
92- private options : ISelectOptionItem [ ] ;
92+ private options : ISelectOptionItem [ ] = [ ] ;
9393 private selected : number ;
9494 private readonly _onDidSelect : Emitter < ISelectData > ;
9595 private styles : ISelectBoxStyles ;
96- private listRenderer : SelectListRenderer ;
97- private contextViewProvider : IContextViewProvider ;
98- private selectDropDownContainer : HTMLElement ;
99- private styleElement : HTMLStyleElement ;
100- private selectList : List < ISelectOptionItem > ;
101- private selectDropDownListContainer : HTMLElement ;
102- private widthControlElement : HTMLElement ;
103- private _currentSelection : number ;
104- private _dropDownPosition : AnchorPosition ;
96+ private listRenderer ! : SelectListRenderer ;
97+ private contextViewProvider ! : IContextViewProvider ;
98+ private selectDropDownContainer ! : HTMLElement ;
99+ private styleElement ! : HTMLStyleElement ;
100+ private selectList ! : List < ISelectOptionItem > ;
101+ private selectDropDownListContainer ! : HTMLElement ;
102+ private widthControlElement ! : HTMLElement ;
103+ private _currentSelection = 0 ;
104+ private _dropDownPosition ! : AnchorPosition ;
105105 private _hasDetails : boolean = false ;
106- private selectionDetailsPane : HTMLElement ;
106+ private selectionDetailsPane ! : HTMLElement ;
107107 private _skipLayout : boolean = false ;
108108
109109 private _sticky : boolean = false ; // for dev purposes only
@@ -241,7 +241,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
241241 }
242242
243243 public setOptions ( options : ISelectOptionItem [ ] , selected ?: number ) : void {
244- if ( ! this . options || ! arrays . equals ( this . options , options ) ) {
244+ if ( ! arrays . equals ( this . options , options ) ) {
245245 this . options = options ;
246246 this . selectElement . options . length = 0 ;
247247 this . _hasDetails = false ;
@@ -266,7 +266,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
266266
267267 // Mirror options in drop-down
268268 // Populate select list for non-native select mode
269- if ( this . selectList && ! ! this . options ) {
269+ if ( this . selectList ) {
270270 this . selectList . splice ( 0 , this . selectList . length , this . options ) ;
271271 }
272272 }
@@ -689,7 +689,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
689689 private setWidthControlElement ( container : HTMLElement ) : number {
690690 let elementWidth = 0 ;
691691
692- if ( container && ! ! this . options ) {
692+ if ( container ) {
693693 let longest = 0 ;
694694 let longestLength = 0 ;
695695
0 commit comments