Skip to content

Commit

Permalink
Merge pull request #418 from dotJack/master
Browse files Browse the repository at this point in the history
Fix typeof compared to undefined and not "undefined"
  • Loading branch information
jagenjo committed Sep 25, 2023
2 parents 2693f18 + 8e08c77 commit 44e49ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/litegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down Expand Up @@ -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 );
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 44e49ac

Please sign in to comment.