Migrate app.js (#12)

* Rename js to ts

* Fix all tsc errors

* nit
This commit is contained in:
Chenlei Hu
2024-06-14 17:11:19 -04:00
committed by GitHub
parent 23074eb823
commit 1376459cd8
10 changed files with 213 additions and 49 deletions

View File

@@ -43,9 +43,11 @@ export function applyTextReplacements(app: ComfyApp, value: string): string {
}
// Find node with matching S&R property name
// @ts-ignore
let nodes = app.graph._nodes.filter((n) => n.properties?.["Node name for S&R"] === split[0]);
// If we cant, see if there is a node with that title
if (!nodes.length) {
// @ts-ignore
nodes = app.graph._nodes.filter((n) => n.title === split[0]);
}
if (!nodes.length) {