File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -90,18 +90,16 @@ const closeDialog = () => {
9090const canvasStore = useCanvasStore ()
9191
9292const addNode = (nodeDef : ComfyNodeDefImpl ) => {
93- if (! triggerEvent ) {
94- console .warn (' The trigger event was undefined when addNode was called.' )
95- return
96- }
97-
9893 const node = litegraphService .addNodeOnGraph (nodeDef , {
9994 pos: getNewNodeLocation ()
10095 })
10196
102- if (disconnectOnReset ) {
97+ if (disconnectOnReset && triggerEvent ) {
10398 canvasStore .getCanvas ().linkConnector .connectToNode (node , triggerEvent )
99+ } else if (! triggerEvent ) {
100+ console .warn (' The trigger event was undefined when addNode was called.' )
104101 }
102+
105103 disconnectOnReset = false
106104
107105 // Notify changeTracker - new step should be added
You can’t perform that action at this time.
0 commit comments