Lutz Roeder 5 лет назад
Родитель
Сommit
f95709f366
10 измененных файлов с 11 добавлено и 11 удалено
  1. 1 1
      src/bigdl-proto.js
  2. 1 1
      src/caffe-proto.js
  3. 1 1
      src/caffe2-proto.js
  4. 1 1
      src/cntk-proto.js
  5. 1 1
      src/coreml-proto.js
  6. 1 1
      src/onnx-proto.js
  7. 1 1
      src/paddle-proto.js
  8. 1 1
      src/tf-proto.js
  9. 1 1
      src/uff-proto.js
  10. 2 2
      tools/protoc.js

+ 1 - 1
src/bigdl-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('bigdl');
+var $root = protobuf.get('bigdl');
 
 $root.com = {};
 

+ 1 - 1
src/caffe-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('caffe');
+var $root = protobuf.get('caffe');
 
 $root.caffe = {};
 

+ 1 - 1
src/caffe2-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('caffe2');
+var $root = protobuf.get('caffe2');
 
 $root.caffe2 = {};
 

+ 1 - 1
src/cntk-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('cntk');
+var $root = protobuf.get('cntk');
 
 $root.CNTK = {};
 

+ 1 - 1
src/coreml-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('coreml');
+var $root = protobuf.get('coreml');
 
 $root.CoreML = {};
 

+ 1 - 1
src/onnx-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('onnx');
+var $root = protobuf.get('onnx');
 
 $root.onnx = {};
 

+ 1 - 1
src/paddle-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('paddle');
+var $root = protobuf.get('paddle');
 
 $root.paddle = {};
 

+ 1 - 1
src/tf-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('tf');
+var $root = protobuf.get('tf');
 
 $root.tensorflow = {};
 

+ 1 - 1
src/uff-proto.js

@@ -1,4 +1,4 @@
-const $root = protobuf.get('uff');
+var $root = protobuf.get('uff');
 
 $root.uff = {};
 

+ 2 - 2
tools/protoc.js

@@ -1130,7 +1130,7 @@ protoc.Generator = class {
         this._root = root;
         this._text = text;
         this._builder = new protoc.Generator.StringBuilder();
-        this._builder.add("const $root = protobuf.get('" + this._root.alias + "');");
+        this._builder.add("var $root = protobuf.get('" + this._root.alias + "');");
         this._buildContent(this._root);
         this._content = this._builder.toString();
     }
@@ -1421,7 +1421,7 @@ protoc.Generator = class {
     }
 
     static _escapeName(name) {
-        return !name ? "$root" : protoc.Generator._isKeyword(name) ? name + "_" : name;
+        return !name ? '$root' : protoc.Generator._isKeyword(name) ? name + '_' : name;
     }
 
     static _propertyReference(name) {