Fix usage

This commit is contained in:
Adria Navarro 2025-01-14 11:14:34 +01:00
parent 8624997f4c
commit 06013929e4
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@
let loading = false
let deleteConfirmationDialog
$: defaultName = getSequentialName($snippets, "MySnippet", x => x.name)
$: defaultName = getSequentialName($snippets, "MySnippet", {
getName: x => x.name,
})
$: key = snippet?.name
$: name = snippet?.name || defaultName
$: code = snippet?.code ? encodeJSBinding(snippet.code) : ""