Skip to content

Commit ae1698e

Browse files
committed
fix(presets): use optional chaining for current preset possibly undefined
1 parent bae4677 commit ae1698e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/ui/presets.view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class PresetsView {
7373
}
7474

7575
populateDropdownOptions (): void {
76-
const currentPreset = state.networkPreset || 'allOn';
76+
const currentPreset = state?.networkPreset || 'allOn';
7777
Object.keys (presets).forEach ((presetName) => {
7878
const option = document.createElement ('option');
7979
option.value = presetName;

0 commit comments

Comments
 (0)