aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/checkable.ts3
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