From 8dffa89ae9c259ee20a6f84139783bc490cb738f Mon Sep 17 00:00:00 2001 From: Rhys Yang Date: Fri, 24 Nov 2023 00:20:38 +0800 Subject: [PATCH] Code cleanup --- js/promptDisplay.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/promptDisplay.js b/js/promptDisplay.js index 7322612..15c670f 100644 --- a/js/promptDisplay.js +++ b/js/promptDisplay.js @@ -34,9 +34,9 @@ app.registerExtension({ const onExecuted = nodeType.prototype.onExecuted; nodeType.prototype.onExecuted = function (message) { onExecuted?.apply(this, arguments); - this.widgets[3].value = message.text[0]; - this.widgets[4].value = message.text[1]; - this.widgets[5].value = message.text[2]; + this.widgets.find(obj => obj.name === "positive").value = message.text[0]; + this.widgets.find(obj => obj.name === "negative").value = message.text[1]; + this.widgets.find(obj => obj.name === "setting").value = message.text[2]; }; } },