diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-10-15 18:55:34 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-10-15 18:55:34 +0200 |
commit | 353eeca339e060eb4a03e0b67343086854a5e5d7 (patch) | |
tree | 8b97aff55d67b434a389848e5a36e19f4cc816af /src/checkable.ts | |
parent | 03782f8aea043042aaa069de0b91cdb80fbb4679 (diff) |
add missing typeof, makes unit tests pass
Diffstat (limited to 'src/checkable.ts')
-rw-r--r-- | src/checkable.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/checkable.ts b/src/checkable.ts index 0e437839e..8e942d7cc 100644 --- a/src/checkable.ts +++ b/src/checkable.ts @@ -216,7 +216,8 @@ export namespace Checkable { type: target, }, ["(root)"]); if (opts.validate) { - if (target.validate !== "function") { + if (typeof target.validate !== "function") { + console.error("target", target); throw Error("invalid Checkable annotion: validate method required"); } // May throw exception |