mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Fix loading behavior when manually typing card type (#25502)
This commit is contained in:
parent
5d4805cde6
commit
7e56d5f351
@ -82,6 +82,8 @@ export abstract class HuiElementEditor<
|
||||
|
||||
@query("ha-yaml-editor") _yamlEditor?: HaYamlEditor;
|
||||
|
||||
private _loadCount = 0;
|
||||
|
||||
public get value(): T | undefined {
|
||||
return this._config;
|
||||
}
|
||||
@ -411,7 +413,7 @@ export abstract class HuiElementEditor<
|
||||
if (!this.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const loadNum = ++this._loadCount;
|
||||
try {
|
||||
this._errors = undefined;
|
||||
this._warnings = undefined;
|
||||
@ -435,6 +437,9 @@ export abstract class HuiElementEditor<
|
||||
this.GUImode = false;
|
||||
}
|
||||
} catch (err: any) {
|
||||
if (loadNum !== this._loadCount) {
|
||||
return;
|
||||
}
|
||||
if (err instanceof GUISupportError) {
|
||||
this._warnings = err.warnings ?? [err.message];
|
||||
this._errors = err.errors || undefined;
|
||||
|
Loading…
x
Reference in New Issue
Block a user