From 670a6b22d751df9d0ccf6c48e2f2166e70b4c27e Mon Sep 17 00:00:00 2001 From: Gamosoft Date: Wed, 10 Dec 2025 09:41:54 +0100 Subject: [PATCH] prevent double initialization (Alpine.js may call x-init twice in some cases) --- frontend/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/app.js b/frontend/app.js index 8e8aff3..308924e 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -281,6 +281,10 @@ function noteApp() { // Initialize app async init() { + // Prevent double initialization (Alpine.js may call x-init twice in some cases) + if (window.__noteapp_initialized) return; + window.__noteapp_initialized = true; + // Store global reference for native event handlers in x-html content window.$root = this;