Register closeEditor as property of hui-editor (#2797)

* Register closeEditor as property of hui-editor

* Belt and suspenders

* Update hui-editor.ts
This commit is contained in:
Thomas Lovén 2019-02-19 18:20:21 +01:00 committed by Paulus Schoutsen
parent 8a9594d918
commit 7904483272

View File

@ -38,6 +38,7 @@ class LovelaceFullConfigEditor extends LitElement {
return { return {
hass: {}, hass: {},
lovelace: {}, lovelace: {},
closeEditor: {},
_saving: {}, _saving: {},
_changed: {}, _changed: {},
}; };
@ -150,7 +151,9 @@ class LovelaceFullConfigEditor extends LitElement {
} }
} }
window.onbeforeunload = null; window.onbeforeunload = null;
this.closeEditor!(); if (this.closeEditor) {
this.closeEditor();
}
} }
private async _handleSave() { private async _handleSave() {