@@ -24,7 +24,7 @@ export interface Settings extends Index {
2424 editorFontSize : number ; // `editor.fontSize`
2525 themeId : string ; // `workbench.colorTheme`
2626 autoSave : 'on' | 'off' ; // `editor.autoSave`
27- quickSuggestions : Record < 'other' | 'comments' | 'strings' , boolean > ; // `editor.quickSuggestions`
27+ quickSuggestions : Record < 'other' | 'comments' | 'strings' , boolean > ; // `editor.quickSuggestions`
2828
2929 autoScaleInterface : boolean ; // `arduino.window.autoScale`
3030 interfaceScale : number ; // `arduino.window.zoomLevel` https://github.com/eclipse-theia/theia/issues/8751
@@ -100,9 +100,9 @@ export class SettingsService {
100100 this . preferenceService . get < string > ( 'workbench.colorTheme' , 'arduino-theme' ) ,
101101 this . preferenceService . get < 'on' | 'off' > ( 'editor.autoSave' , 'on' ) ,
102102 this . preferenceService . get < object > ( 'editor.quickSuggestion' , {
103- 'other' : false ,
104- 'comments' : false ,
105- 'strings' : false
103+ 'other' : false ,
104+ 'comments' : false ,
105+ 'strings' : false
106106 } ) ,
107107 this . preferenceService . get < boolean > ( 'arduino.window.autoScale' , true ) ,
108108 this . preferenceService . get < number > ( 'arduino.window.zoomLevel' , 0 ) ,
@@ -569,18 +569,18 @@ export class SettingsComponent extends React.Component<SettingsComponent.Props,
569569 } ;
570570
571571 protected quickSuggestionsOtherDidChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
572-
573- // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling
574- const newVal = event . target . checked ? true : false
575-
576- this . setState ( prevState => {
577- return {
578- quickSuggestions : {
579- ...prevState . quickSuggestions ,
580- other : newVal
581- }
582- }
583- } ) ;
572+
573+ // need to persist react events through lifecycle https://reactjs.org/docs/events.html#event-pooling
574+ const newVal = event . target . checked ? true : false
575+
576+ this . setState ( prevState => {
577+ return {
578+ quickSuggestions : {
579+ ...prevState . quickSuggestions ,
580+ other : newVal
581+ }
582+ }
583+ } ) ;
584584 } ;
585585
586586 protected themeDidChange = ( event : React . ChangeEvent < HTMLSelectElement > ) => {
@@ -823,7 +823,7 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
823823 }
824824
825825 get value ( ) : string [ ] {
826- return this . textArea . value . split ( '\n' ) . map ( url => url . trim ( ) ) ;
826+ return this . textArea . value . split ( '\n' ) . map ( url => url . trim ( ) ) . filter ( url => ! ! url ) ;
827827 }
828828
829829 protected onAfterAttach ( message : Message ) : void {
0 commit comments