Fix unbookmark node in node library (#639)

* Add unbookmark test

* Fix unbookmark
This commit is contained in:
Chenlei Hu
2024-08-26 11:04:08 -04:00
committed by GitHub
parent 03ac6eea19
commit a69858c87a
2 changed files with 23 additions and 1 deletions

View File

@@ -30,6 +30,10 @@ export const useNodeBookmarkStore = defineStore('nodeBookmark', () => {
const toggleBookmark = (node: ComfyNodeDefImpl) => {
if (isBookmarked(node)) {
deleteBookmark(node.nodePath)
// Delete the bookmark at the top level if it exists
// This is used for clicking the bookmark button in the node library, i.e.
// the node is inside original/standard node library tree node
deleteBookmark(node.display_name)
} else {
addBookmark(node.display_name)
}