From d69d610bf004c8bdd65dbc1127c1772d7e9ad451 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 2 May 2026 16:31:14 -0700 Subject: [PATCH] fix(ui): guard app custom element registration --- ui/src/ui/app.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); +}