From cb6828cb666a8682018e71bfa66b3075f4969f8b Mon Sep 17 00:00:00 2001 From: Stefan Probst Date: Fri, 13 Oct 2023 08:52:36 +0200 Subject: [PATCH] fix: ensure generated window id is valid attribute --- stores/use-windows-store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stores/use-windows-store.ts b/stores/use-windows-store.ts index 4e154fe..38603ab 100644 --- a/stores/use-windows-store.ts +++ b/stores/use-windows-store.ts @@ -103,7 +103,7 @@ export const useWindowsStore = defineStore("windows", () => { const rootElement = document.getElementById(windowRootId); if (rootElement == null) return; - const id = params.id ?? nanoid(); + const id = params.id ?? `window-${nanoid()}`; const { title, kind } = params; if (registry.value.has(id)) {