mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 07:30:11 +00:00
fix: use getTitle() to find nodes by display name in getNodeRefsByTitle
The getNodeRefsByTitle function was using n.title === title, which only works for nodes with an explicitly set title property. Nodes without a custom title (most nodes) fall back to constructor.title, which is set from the node's display_name during registration. Using getTitle() instead properly returns this.title || this.constructor.title, allowing selectNodes to work with display names like 'VAE Decode' and 'Load Checkpoint'. Amp-Thread-ID: https://ampcode.com/threads/T-019c17d8-6930-748a-bd55-2370f17af8ea
This commit is contained in:
@@ -1605,7 +1605,7 @@ export class ComfyPage {
|
||||
(
|
||||
await this.page.evaluate((title) => {
|
||||
return window['app'].graph.nodes
|
||||
.filter((n: LGraphNode) => n.title === title)
|
||||
.filter((n: LGraphNode) => n.getTitle() === title)
|
||||
.map((n: LGraphNode) => n.id)
|
||||
}, title)
|
||||
).map((id: NodeId) => this.getNodeRefById(id))
|
||||
|
||||
Reference in New Issue
Block a user