From 6dafc03a2dda372f739b5e0beed9ae5c58cab209 Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Sun, 13 Aug 2023 09:41:33 +0100 Subject: [PATCH] Fix floor division --- js/mathExpression.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 js/mathExpression.js diff --git a/js/mathExpression.js b/js/mathExpression.js new file mode 100644 index 0000000..b61693c --- /dev/null +++ b/js/mathExpression.js @@ -0,0 +1,14 @@ +import { app } from "/scripts/app.js"; +import { ComfyWidgets } from "/scripts/widgets.js"; + +app.registerExtension({ + name: "pysssss.MathExpression", + init() { + const STRING = ComfyWidgets.STRING; + ComfyWidgets.STRING = function (node, inputName, inputData) { + const r = STRING.apply(this, arguments); + r.widget.dynamicPrompts = inputData?.[1].dynamicPrompts; + return r; + }; + }, +});