From 71ae48c8e7e2f3a59f052cefcb19b91523f30948 Mon Sep 17 00:00:00 2001 From: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com> Date: Wed, 7 Jun 2023 19:10:24 -0400 Subject: [PATCH] Fix conformance view state bug (#5120) Fixes #5119 where a type error happens during page load --- static/panes/conformance-view.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/static/panes/conformance-view.ts b/static/panes/conformance-view.ts index dab5ab0d271..b6eff602dd6 100644 --- a/static/panes/conformance-view.ts +++ b/static/panes/conformance-view.ts @@ -74,7 +74,7 @@ export class Conformance extends Pane { private langId: string; private source: string; private sourceNeedsExpanding: boolean; - private compilerPickers: CompilerEntry[]; + private compilerPickers: CompilerEntry[] = []; private expandedSourceAndFiles: SourceAndFiles | null; private currentLibs: Lib[]; private status: ConformanceStatus; @@ -308,8 +308,6 @@ export class Conformance extends Pane { this.selectorList.append(newSelector); - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (!this.compilerPickers) this.compilerPickers = []; this.compilerPickers.push(newCompilerEntry); this.handleToolbarUI(); @@ -478,9 +476,6 @@ export class Conformance extends Pane { } currentState(): ConformanceViewState { - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition - if (!this.compilerPickers) this.compilerPickers = []; - const compilers = this.compilerPickers.map(compilerEntry => ({ compilerId: this.getCompilerId(compilerEntry), options: compilerEntry.optionsField?.val() || '',