diff --git a/ui/src/ui/app.ts b/ui/src/ui/app.ts index 1953c6f6c90..54431bc0cc8 100644 --- a/ui/src/ui/app.ts +++ b/ui/src/ui/app.ts @@ -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); +}