Skip to content

Commit 44e49ac

Browse files
authored
Merge pull request #418 from dotJack/master
Fix typeof compared to undefined and not "undefined"
2 parents 2693f18 + 8e08c77 commit 44e49ac

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/litegraph.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5697,10 +5697,10 @@ LGraphNode.prototype.executeAction = function(action)
56975697
* @method enableWebGL
56985698
**/
56995699
LGraphCanvas.prototype.enableWebGL = function() {
5700-
if (typeof GL === undefined) {
5700+
if (typeof GL === "undefined") {
57015701
throw "litegl.js must be included to use a WebGL canvas";
57025702
}
5703-
if (typeof enableWebGLCanvas === undefined) {
5703+
if (typeof enableWebGLCanvas === "undefined") {
57045704
throw "webglCanvas.js must be included to use this feature";
57055705
}
57065706

@@ -11692,7 +11692,7 @@ LGraphNode.prototype.executeAction = function(action)
1169211692
default:
1169311693
iS = 0; // try with first if no name set
1169411694
}
11695-
if (typeof options.node_from.outputs[iS] !== undefined){
11695+
if (typeof options.node_from.outputs[iS] !== "undefined"){
1169611696
if (iS!==false && iS>-1){
1169711697
options.node_from.connectByType( iS, node, options.node_from.outputs[iS].type );
1169811698
}
@@ -11720,7 +11720,7 @@ LGraphNode.prototype.executeAction = function(action)
1172011720
default:
1172111721
iS = 0; // try with first if no name set
1172211722
}
11723-
if (typeof options.node_to.inputs[iS] !== undefined){
11723+
if (typeof options.node_to.inputs[iS] !== "undefined"){
1172411724
if (iS!==false && iS>-1){
1172511725
// try connection
1172611726
options.node_to.connectByTypeOutput(iS,node,options.node_to.inputs[iS].type);

0 commit comments

Comments
 (0)