diff --git a/build/litegraph.js b/build/litegraph.js index 9a05c6176..77b98aff2 100644 --- a/build/litegraph.js +++ b/build/litegraph.js @@ -19263,7 +19263,23 @@ LGWebSocket.prototype.createSocket = function() if( data.room && data.room != this.properties.room ) return; if( e.data.type == 1 ) - that.triggerSlot( 0, data ); + { + if(data.data.object_class && LiteGraph[data.data.object_class] ) + { + var obj = null; + try + { + obj = new LiteGraph[data.data.object_class](data.data); + that.triggerSlot( 0, obj ); + } + catch (err) + { + return; + } + } + else + that.triggerSlot( 0, data.data ); + } else that._last_received_data[ e.data.channel || 0 ] = data.data; } diff --git a/build/litegraph.min.js b/build/litegraph.min.js index 62f2ab503..d3b810c59 100755 --- a/build/litegraph.min.js +++ b/build/litegraph.min.js @@ -543,9 +543,9 @@ for(var c=0;c