From 678aec9438df6ef32c61ccfa08e8e30f559a5e7c Mon Sep 17 00:00:00 2001 From: timwis Date: Fri, 8 Jul 2016 06:46:30 -0400 Subject: [PATCH] onErrorWrap should pass all params. Fixes yoshuawuyts/choo#142 --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index d70f3ab..94d8945 100644 --- a/index.js +++ b/index.js @@ -210,7 +210,7 @@ function defaultOnError (err) { } function wrapOnError (onError) { - return function onErrorWrap (err) { - if (err) onError(err) + return function onErrorWrap (err, state, createSend) { + if (err) onError(err, state, createSend) } }