From 722fb763b56282f7b3dbfb5ab55c332c404a3390 Mon Sep 17 00:00:00 2001 From: Patrick Kissling <33731393+pkissling@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:47:58 +0100 Subject: [PATCH] fix: Fix custom element define error (#472) --- src/action-handler-directive.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/action-handler-directive.ts b/src/action-handler-directive.ts index b55ba647..9f3ccc3d 100644 --- a/src/action-handler-directive.ts +++ b/src/action-handler-directive.ts @@ -154,7 +154,9 @@ class ActionHandler extends HTMLElement implements ActionHandler { } } -customElements.define('action-handler-clock-weather', ActionHandler) +if (!customElements.get('action-handler-clock-weather')) { + customElements.define('action-handler-clock-weather', ActionHandler) +} const getActionHandler = (): ActionHandler => { const body = document.body