2
0
Lutz Roeder 4 жил өмнө
parent
commit
cfdb98e0f7
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      source/tf.js

+ 1 - 1
source/tf.js

@@ -2602,7 +2602,7 @@ tf.JsonReader = class {
 
     static decodeFunctionDefLibrary(json) {
         const message = new tf.proto.tensorflow.FunctionDefLibrary();
-        message.function = (json.function || []).map((json) => tf.JsonReader.decodeFunctionDef(json));
+        message.function = json ? (json.function || []).map((json) => tf.JsonReader.decodeFunctionDef(json)) : [];
         return message;
     }