Reset history when changing edit mode

This commit is contained in:
Paul Bottein 2023-08-24 08:48:44 +02:00
parent 497484d419
commit f3f2059634
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -345,7 +345,11 @@ export class LovelacePanel extends LitElement {
}
if (!editMode || this.lovelace!.mode !== "generated") {
this._updateLovelace({ editMode });
this._updateLovelace({
editMode,
configHistory: [this.lovelace!.config],
configHistoryIndex: 0,
});
return;
}