mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 00:36:34 +00:00
Fix automation/scripts dirty on start edit (#6474)
This commit is contained in:
parent
cf7efb5bfc
commit
68e1378615
@ -411,6 +411,10 @@ export class HaAutomationEditor extends LitElement {
|
||||
const mode = ((ev.target as PaperListboxElement)?.selectedItem as any)
|
||||
?.mode;
|
||||
|
||||
if (mode === this._config!.mode) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._config = { ...this._config!, mode };
|
||||
if (!MODES_MAX.includes(mode)) {
|
||||
delete this._config.max;
|
||||
|
@ -306,6 +306,10 @@ export class HaScriptEditor extends LitElement {
|
||||
const mode = ((ev.target as PaperListboxElement)?.selectedItem as any)
|
||||
?.mode;
|
||||
|
||||
if (mode === this._config!.mode) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._config = { ...this._config!, mode };
|
||||
if (!MODES_MAX.includes(mode)) {
|
||||
delete this._config.max;
|
||||
|
Loading…
x
Reference in New Issue
Block a user