Explorar o código

Update message.js

Lutz Roeder hai 1 mes
pai
achega
180786e256
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      source/message.js

+ 1 - 1
source/message.js

@@ -109,7 +109,7 @@ message.Argument = class {
 message.Value = class {
 
     constructor(data) {
-        this.name = data.name ? data.name.toString() : '';
+        this.name = data.name !== undefined && data.name !== null ? data.name.toString() : '';
         this.initializer = data.initializer ? new message.Tensor(data.initializer) : null;
         if (this.initializer && this.initializer.type) {
             this.type = this.initializer.type;