From 6d525e7f324ebb31da67daa5bf668917d05bd7ad Mon Sep 17 00:00:00 2001 From: Trung0246 Date: Mon, 27 Nov 2023 23:35:49 -0800 Subject: [PATCH] One last attempt --- web/js/nodes.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/web/js/nodes.js b/web/js/nodes.js index 1997e4f..4f69ec0 100644 --- a/web/js/nodes.js +++ b/web/js/nodes.js @@ -5,7 +5,7 @@ import { ComfyWidgets } from "../../../scripts/widgets.js"; (async () => { window.setTimeout(() => { - app.graph.extra["0246_VERSION"] = "0.0.1"; // Only used when breaking changes happen + app.graph.extra["0246_VERSION"] = [0, 0, 1]; // Only used when breaking changes happen }, 1500); async function try_import(name) { @@ -16,6 +16,16 @@ import { ComfyWidgets } from "../../../scripts/widgets.js"; } } + function compare_version(a, b) { + for (let i = 0; i < a.length; ++ i) { + if (a[i] > b[i]) + return 1; + if (a[i] < b[i]) + return -1; + } + return 0; + } + function rgthree_exec(name, ...args) { return rgthree_utils?.[name]?.(...args); } @@ -940,4 +950,4 @@ import { ComfyWidgets } from "../../../scripts/widgets.js"; }); // var curr_node = LiteGraph.createNode(LiteGraph.getNodeTypesInCategory(LiteGraph.getNodeTypesCategories()[2])[2].type); -})(); +})(); \ No newline at end of file