From 07188fcb3a075dda93f95a9e045caa783b3c90a7 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 24 Nov 2020 15:48:07 +0100 Subject: [PATCH] add proper instance declaration for ValidationFailedError --- package.json | 2 +- src/index.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0165e81..f3c375e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "6.0.0", + "version": "6.0.1", "license": "MIT", "main": "dist/index.js", "typings": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 12213a4..466fd66 100644 --- a/src/index.ts +++ b/src/index.ts @@ -14,6 +14,7 @@ export class ValidationFailedError extends Error { constructor(error: DecodeError) { super(`Decoding value failed: ${JSON.stringify(error)}`); this.error = error; + Object.setPrototypeOf(this, ValidationFailedError.prototype); } }