Skip to content

Commit

Permalink
use existing ID if assigned
Browse files Browse the repository at this point in the history
closes #101
  • Loading branch information
CaptainCodeman committed Jan 26, 2025
1 parent 84aa291 commit d5dc38f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "svelte-headlessui",
"description": "HeadlessUI components for Svelte",
"version": "0.0.45",
"version": "0.0.46",
"type": "module",
"keywords": [
"svelte",
Expand Down Expand Up @@ -49,7 +49,7 @@
"homepage": "https://captaincodeman.github.io/svelte-headlessui/",
"repository": {
"type": "git",
"url": "https://github.com/captaincodeman/svelte-headlessui.git"
"url": "git+https://github.com/captaincodeman/svelte-headlessui.git"
},
"author": {
"name": "Simon Green",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/internal/new-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export function newID() {
}

export function ensureID(node: HTMLElement, prefix: string) {
node.id = `${prefix}:${newID()}`
node.id = node.id ||`${prefix}:${newID()}`
}

0 comments on commit d5dc38f

Please sign in to comment.