From 3f28ae6546cbf4b3f06c65151e3035d802bbe2d8 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Wed, 5 Jul 2017 18:46:30 -0600 Subject: [PATCH] fix: correct args re: Automattic/mongoose#5405 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 990e4c9..124a619 100644 --- a/index.js +++ b/index.js @@ -146,7 +146,7 @@ Kareem.prototype.execPost = function(name, context, args, options, callback) { if (firstError) { if (post.length === numArgs + 2) { - post.apply(context, [firstError].concat(newArgs).concat(function(error) { + post.apply(context, [firstError, null].concat(function(error) { if (error) { firstError = error; }