@dfinity/candid
Advanced tools
Comparing version 0.10.2 to 0.10.3
@@ -716,4 +716,10 @@ "use strict"; | ||
} | ||
if (idx < this._fields.length) { | ||
throw new Error('Cannot find field ' + this._fields[idx][0]); | ||
for (const [expectKey, expectType] of this._fields.slice(idx)) { | ||
if (expectType instanceof OptClass || expectType instanceof ReservedClass) { | ||
// TODO this assumes null value in opt is represented as [] | ||
x[expectKey] = []; | ||
} | ||
else { | ||
throw new Error('Cannot find required field ' + expectKey); | ||
} | ||
} | ||
@@ -720,0 +726,0 @@ return x; |
@@ -696,4 +696,10 @@ // tslint:disable:max-classes-per-file | ||
} | ||
if (idx < this._fields.length) { | ||
throw new Error('Cannot find field ' + this._fields[idx][0]); | ||
for (const [expectKey, expectType] of this._fields.slice(idx)) { | ||
if (expectType instanceof OptClass || expectType instanceof ReservedClass) { | ||
// TODO this assumes null value in opt is represented as [] | ||
x[expectKey] = []; | ||
} | ||
else { | ||
throw new Error('Cannot find required field ' + expectKey); | ||
} | ||
} | ||
@@ -700,0 +706,0 @@ return x; |
{ | ||
"name": "@dfinity/candid", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -49,3 +49,3 @@ "license": "Apache-2.0", | ||
"jest-expect-message": "^1.0.2", | ||
"node-fetch": "2.6.1", | ||
"node-fetch": "^2.6.7", | ||
"prettier": "^2.0.5", | ||
@@ -55,3 +55,3 @@ "text-encoding": "^0.7.0", | ||
"tslint": "^5.20.0", | ||
"typedoc": "^0.20.32", | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.2.3", | ||
@@ -58,0 +58,0 @@ "whatwg-fetch": "^3.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
509047
5990