fix(ui): guard app custom element registration

This commit is contained in:
Vincent Koc
2026-05-02 16:31:14 -07:00
parent 411df59916
commit d69d610bf0

View File

@@ -1,5 +1,5 @@
import { LitElement } from "lit";
import { customElement, state } from "lit/decorators.js";
import { state } from "lit/decorators.js";
import { i18n, I18nController, isSupportedLocale } from "../i18n/index.ts";
import {
handleChannelConfigReload as handleChannelConfigReloadInternal,
@@ -140,7 +140,6 @@ function resolveOnboardingMode(): boolean {
return normalized === "1" || normalized === "true" || normalized === "yes" || normalized === "on";
}
@customElement("openclaw-app")
export class OpenClawApp extends LitElement {
private i18nController = new I18nController(this);
clientInstanceId = generateUUID();
@@ -1165,3 +1164,7 @@ export class OpenClawApp extends LitElement {
return renderApp(this as unknown as AppViewState);
}
}
if (!customElements.get("openclaw-app")) {
customElements.define("openclaw-app", OpenClawApp);
}