From 8e08c77c4247d1aea79e7a1ac3d3ba1c165b2378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristjan=20P=C3=A4rt?= Date: Mon, 25 Sep 2023 11:08:19 +0300 Subject: [PATCH] fix typeof implementations not actually checking for typeof undefined --- src/litegraph.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index 8c71971e1..cf6ba04d1 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -5697,10 +5697,10 @@ LGraphNode.prototype.executeAction = function(action) * @method enableWebGL **/ LGraphCanvas.prototype.enableWebGL = function() { - if (typeof GL === undefined) { + if (typeof GL === "undefined") { throw "litegl.js must be included to use a WebGL canvas"; } - if (typeof enableWebGLCanvas === undefined) { + if (typeof enableWebGLCanvas === "undefined") { throw "webglCanvas.js must be included to use this feature"; } @@ -11692,7 +11692,7 @@ LGraphNode.prototype.executeAction = function(action) default: iS = 0; // try with first if no name set } - if (typeof options.node_from.outputs[iS] !== undefined){ + if (typeof options.node_from.outputs[iS] !== "undefined"){ if (iS!==false && iS>-1){ options.node_from.connectByType( iS, node, options.node_from.outputs[iS].type ); } @@ -11720,7 +11720,7 @@ LGraphNode.prototype.executeAction = function(action) default: iS = 0; // try with first if no name set } - if (typeof options.node_to.inputs[iS] !== undefined){ + if (typeof options.node_to.inputs[iS] !== "undefined"){ if (iS!==false && iS>-1){ // try connection options.node_to.connectByTypeOutput(iS,node,options.node_to.inputs[iS].type);