aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-25 19:24:23 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-25 19:24:23 +0100
commit266b33dc428f853d279a179907a38d999d4dc86b (patch)
treedd8b3b2d175c5381bce71a1367ea988062e49aa0 /src/util
parentadebfab94e76ee5d34a4f22d15fc085daef9ae00 (diff)
downloadwallet-core-266b33dc428f853d279a179907a38d999d4dc86b.tar.xz
fix bug in the WebExtensions pay page
Diffstat (limited to 'src/util')
-rw-r--r--src/util/codec.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/codec.ts b/src/util/codec.ts
index e18a5e74c..09fa9f953 100644
--- a/src/util/codec.ts
+++ b/src/util/codec.ts
@@ -106,6 +106,12 @@ class ObjectCodecBuilder<OutputType, PartialOutputType> {
path: [`(${objectDisplayName})`],
};
}
+ if (typeof x !== "object") {
+ throw new DecodingError(
+ `expected object for ${objectDisplayName} at ${renderContext(
+ c,
+ )} but got ${typeof x}`)
+ }
const obj: any = {};
for (const prop of propList) {
const propRawVal = x[prop.name];