From 71304bc3f4691be8f99f3b0d9f273c5eb8ec268e Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 14 Jun 2020 02:58:14 +0200 Subject: [PATCH] Revert "Add callIfNull support" This reverts commit 5dd62e28365d1f889824f83153ca1af307036cca. --- index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/index.js b/index.js index 9a235f1..f4f6681 100644 --- a/index.js +++ b/index.js @@ -3,13 +3,9 @@ const combinator = require("@validatem/combinator"); module.exports = function withContext(rules, context) { - let validator = combinator((item, applyValidators, parentContext) => { + return combinator((item, applyValidators, parentContext) => { let mergedContext = Object.assign({}, parentContext, context); return applyValidators(item, rules, mergedContext); }); - - validator.callIfNull = true; - - return validator; };