mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-11 02:20:08 +00:00
Fix node def registeration (#803)
This commit is contained in:
@@ -2013,7 +2013,7 @@ export class ComfyApp {
|
||||
// TODO: change to "title?" once litegraph.d.ts has been updated
|
||||
static title = nodeData.display_name || nodeData.name
|
||||
static nodeData? = nodeData
|
||||
static category: string = nodeData.category
|
||||
static category?: string
|
||||
|
||||
constructor(title?: string) {
|
||||
super(title)
|
||||
@@ -2092,6 +2092,9 @@ export class ComfyApp {
|
||||
|
||||
await this.#invokeExtensionsAsync('beforeRegisterNodeDef', node, nodeData)
|
||||
LiteGraph.registerNodeType(nodeId, node)
|
||||
// Note: Do not move this to the class definition, it will be overwritten
|
||||
// @ts-expect-error
|
||||
node.category = nodeData.category
|
||||
}
|
||||
|
||||
async registerNodesFromDefs(defs: Record<string, ComfyNodeDef>) {
|
||||
|
||||
@@ -5,7 +5,7 @@ export declare class ComfyLGraphNode extends LGraphNode {
|
||||
static comfyClass: string
|
||||
static title: string
|
||||
static nodeData?: ComfyNodeDef
|
||||
static category: string
|
||||
static category?: string
|
||||
|
||||
constructor(title?: string)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user