Fix chart error that caused query editor to close (#2652)

This commit is contained in:
Matt Irvine
2018-09-20 14:29:05 -07:00
committed by Karl Burtram
parent c0917e9276
commit 216b6eecc0

View File

@@ -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]);
}