From 216b6eecc090b4610f9a097711d28cb382575b40 Mon Sep 17 00:00:00 2001 From: Matt Irvine Date: Thu, 20 Sep 2018 14:29:05 -0700 Subject: [PATCH] Fix chart error that caused query editor to close (#2652) --- src/sql/parts/query/editor/charting/chartView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/parts/query/editor/charting/chartView.ts b/src/sql/parts/query/editor/charting/chartView.ts index 5f02a08c48..ddd44e4e31 100644 --- a/src/sql/parts/query/editor/charting/chartView.ts +++ b/src/sql/parts/query/editor/charting/chartView.ts @@ -319,7 +319,7 @@ export class ChartView implements IPanelView { }); setFunc = (val: string) => { if (!isUndefinedOrNull(val)) { - input.value = val; + numberInput.value = val; } }; this.optionDisposables.push(attachInputBoxStyler(numberInput, this._themeService)); @@ -334,7 +334,7 @@ export class ChartView implements IPanelView { this._state = val; if (this.state.options) { for (let key in this.state.options) { - if (this.state.options.hasOwnProperty(key)) { + if (this.state.options.hasOwnProperty(key) && this.optionMap[key]) { this.options[key] = this.state.options[key]; this.optionMap[key].set(this.state.options[key]); }