mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-25 17:24:07 +00:00
[Refactor] Move isImageNode to litegraphUtil (#2450)
This commit is contained in:
10
src/utils/litegraphUtil.ts
Normal file
10
src/utils/litegraphUtil.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { IWidget, LGraphNode } from '@comfyorg/litegraph'
|
||||
|
||||
export function isImageNode(node: LGraphNode) {
|
||||
return (
|
||||
node.imgs ||
|
||||
(node &&
|
||||
node.widgets &&
|
||||
node.widgets.findIndex((obj: IWidget) => obj.name === 'image') >= 0)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user