aboutsummaryrefslogtreecommitdiff
path: root/src/checkable.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 04:16:12 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 04:16:12 +0200
commitd5bba630a35fff72b11273fb5e62c2208f9e1f5b (patch)
tree3397a580d663161be1ba7c46df368ac10d566cdc /src/checkable.ts
parent419a05e801da688a1d0917a6bf16d468e6362a3d (diff)
implement returning coins to user's account
Diffstat (limited to 'src/checkable.ts')
-rw-r--r--src/checkable.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/checkable.ts b/src/checkable.ts
index 802d8f32d..e6ef99336 100644
--- a/src/checkable.ts
+++ b/src/checkable.ts
@@ -217,12 +217,11 @@ export namespace Checkable {
type: target,
}, ["(root)"]);
if (opts.validate) {
- const instance = new target();
- if (typeof instance.validate !== "function") {
+ if (target.validate !== "function") {
throw Error("invalid Checkable annotion: validate method required");
}
// May throw exception
- instance.validate.call(cv);
+ target.validate(cv);
}
return cv;
};