@ngx-grpc/protoc-gen-ng
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -78,3 +78,3 @@ "use strict"; | ||
else if (this.oneOf) { | ||
printer.add("if (_instance." + this.attributeName + " || _instance." + this.attributeName + " === 0) {\n _writer.write" + this.protoDataType + "(" + this.messageField.number + ", _instance." + this.attributeName + ");\n }"); | ||
printer.add("if (_instance." + this.attributeName + " || _instance." + this.attributeName + " === " + (this.isStringType ? '\'0\'' : '0') + ") {\n _writer.write" + this.protoDataType + "(" + this.messageField.number + ", _instance." + this.attributeName + ");\n }"); | ||
} | ||
@@ -81,0 +81,0 @@ else { |
@@ -220,3 +220,3 @@ "use strict"; | ||
Message.prototype.printConstructor = function (printer) { | ||
printer.addLine("\n /**\n * Message constructor. Initializes the properties and applies default Protobuf values if necessary\n * @param _value initial values object or instance of " + this.message.name + " to deeply clone from\n */\n constructor(_value?: RecursivePartial<" + this.message.name + ">) {\n "); | ||
printer.addLine("\n /**\n * Message constructor. Initializes the properties and applies default Protobuf values if necessary\n * @param _value initial values object or instance of " + this.message.name + " to deeply clone from\n */\n constructor(_value?: RecursivePartial<" + this.message.name + ".AsObject>) {\n "); | ||
printer.addLine('_value = _value || {};'); | ||
@@ -223,0 +223,0 @@ this.messageFields.forEach(function (f) { |
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "2.0.1" | ||
"version": "2.0.2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
211917