Add a null check before using settings editor options (#5756)

This commit is contained in:
Karl Burtram
2019-05-30 11:31:00 -07:00
committed by GitHub
parent a197cd6158
commit f9b7bc26c0

View File

@@ -258,6 +258,11 @@ export class SettingsEditor2 extends BaseEditor {
}
private _setOptions(options: SettingsEditorOptions): void {
// {{SQL CARBON EDIT}} - return if options is undefined to avoid nullref
if (!options) {
return;
}
if (options.query) {
this.searchWidget.setValue(options.query);
}