From c70f5c8262c92db198b83f25d91012e9640de6c1 Mon Sep 17 00:00:00 2001 From: Phoenix He Date: Fri, 10 Jul 2020 17:50:07 +0800 Subject: [PATCH] Keyword select: passContext while validating --- keywords/select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keywords/select.js b/keywords/select.js index f79c6c7..da51e5b 100644 --- a/keywords/select.js +++ b/keywords/select.js @@ -18,7 +18,7 @@ module.exports = function defFunc(ajv) { var validate = compiled.cases[schema]; if (validate === undefined) validate = compiled.default; if (typeof validate == 'boolean') return validate; - var valid = validate(data); + var valid = validate.call(this, data); if (!valid) v.errors = validate.errors; return valid; },