protocol-buffers
Advanced tools
Comparing version 2.3.3 to 2.3.4
@@ -268,4 +268,8 @@ var encodings = require('./encodings') | ||
if (vals) { // is enum | ||
def = (def && def in vals) ? vals[def] : vals[Object.keys(vals)[0]] | ||
Message('%s = %s', genobj('this', f.name), ''+parseInt(def || 0)) | ||
if (f.repeated) { | ||
Message('%s = []', genobj('this', f.name)) | ||
} else { | ||
def = (def && def in vals) ? vals[def] : vals[Object.keys(vals)[0]] | ||
Message('%s = %s', genobj('this', f.name), ''+parseInt(def || 0)) | ||
} | ||
return | ||
@@ -272,0 +276,0 @@ } |
{ | ||
"name": "protocol-buffers", | ||
"version": "2.3.3", | ||
"version": "2.3.4", | ||
"description": "Protocol Buffers for Node.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -9,3 +9,4 @@ var tape = require('tape') | ||
var b2 = Defaults.encode({ | ||
num: 10 | ||
num: 10, | ||
foos: [1] | ||
}) | ||
@@ -21,3 +22,4 @@ | ||
foo1: 2, | ||
foo2: 2 | ||
foo2: 2, | ||
foos: [] | ||
}, '1 default') | ||
@@ -28,3 +30,4 @@ | ||
foo1: 2, | ||
foo2: 1 | ||
foo2: 1, | ||
foos: [], | ||
}, 'all defaults') | ||
@@ -35,3 +38,4 @@ | ||
foo1: 2, | ||
foo2: 1 | ||
foo2: 1, | ||
foos: [1] | ||
}, '2 defaults') | ||
@@ -38,0 +42,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31622
931