Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable ts-strict for nodeBookmarkStore #1336

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/stores/nodeBookmarkStore.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// @ts-strict-ignore
import { defineStore } from 'pinia'
import { computed } from 'vue'
import { useSettingStore } from './settingStore'
Expand Down Expand Up @@ -28,7 +27,7 @@ export const useNodeBookmarkStore = defineStore('nodeBookmark', () => {
return
}
const category = bookmark.split('/').slice(0, -1).join('/')
const displayName = bookmark.split('/').pop()
const displayName = bookmark.split('/').pop() ?? ''
const nodeDef = nodeDefStore.nodeDefsByDisplayName[displayName]

if (!nodeDef) return
Expand Down Expand Up @@ -70,7 +69,7 @@ export const useNodeBookmarkStore = defineStore('nodeBookmark', () => {
if (bookmark.endsWith('/')) return createDummyFolderNodeDef(bookmark)

const parts = bookmark.split('/')
const name = parts.pop()
const name = parts.pop() ?? ''
const category = parts.join('/')
const srcNodeDef = nodeDefStore.nodeDefsByName[name]
if (!srcNodeDef) {
Expand Down Expand Up @@ -190,7 +189,7 @@ export const useNodeBookmarkStore = defineStore('nodeBookmark', () => {
settingStore.set('Comfy.NodeLibrary.BookmarksCustomization', {
...bookmarksCustomization.value,
[nodePath]: undefined
})
} as Record<string, BookmarkCustomization>)
}

const renameBookmarkCustomization = (
Expand Down
Loading