mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
fix: only sync node.imgs in Vue nodes mode
This commit is contained in:
@@ -2,6 +2,7 @@ import { useTimeoutFn } from '@vueuse/core'
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
|
||||||
import type { LGraphNode, SubgraphNode } from '@/lib/litegraph/src/litegraph'
|
import type { LGraphNode, SubgraphNode } from '@/lib/litegraph/src/litegraph'
|
||||||
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
|
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
|
||||||
import type {
|
import type {
|
||||||
@@ -163,8 +164,10 @@ export const useNodeOutputStore = defineStore('nodeOutput', () => {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sync node.imgs for backwards compatibility with legacy systems (e.g., Copy Image).
|
* Sync node.imgs for backwards compatibility with legacy systems (e.g., Copy Image).
|
||||||
|
* Only needed in Vue nodes mode since legacy nodes already populate node.imgs.
|
||||||
*/
|
*/
|
||||||
function syncNodeImgs(nodeLocatorId: NodeLocatorId, imageUrls: string[]) {
|
function syncNodeImgs(nodeLocatorId: NodeLocatorId, imageUrls: string[]) {
|
||||||
|
if (!LiteGraph.vueNodesMode) return
|
||||||
if (!imageUrls.length) return
|
if (!imageUrls.length) return
|
||||||
const nodeId = nodeLocatorIdToNodeId(nodeLocatorId)
|
const nodeId = nodeLocatorIdToNodeId(nodeLocatorId)
|
||||||
if (nodeId === null) return
|
if (nodeId === null) return
|
||||||
|
|||||||
Reference in New Issue
Block a user