Fixed bug with -1 type check

This commit is contained in:
Kristofer
2018-04-19 08:49:10 +02:00
parent c248a6e498
commit 098e6780aa
4 changed files with 11 additions and 3 deletions

View File

@@ -336,7 +336,10 @@ var LiteGraph = global.LiteGraph = {
!type_b || //generic input
type_a == type_b || //same type (is valid for triggers)
type_a == LiteGraph.EVENT && type_b == LiteGraph.ACTION )
return true;
return true;
type_a = String(type_a) //* Enforce string type to handle toLowerCase call (-1 number not ok)
type_b = String(type_b)
type_a = type_a.toLowerCase();
type_b = type_b.toLowerCase();