Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f106c97

Browse filesBrowse files
Akos Kittakittaakos
authored andcommitted
Fixed bug when no 3rd party URLs are defined.
Instead of adding an empty string URL, we add nothing. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent 369a8f4 commit f106c97
Copy full SHA for f106c97

File tree

Expand file treeCollapse file tree

1 file changed

+17
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-17
lines changed

‎arduino-ide-extension/src/browser/settings.tsx

Copy file name to clipboardExpand all lines: arduino-ide-extension/src/browser/settings.tsx
+17-17Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.