From c7f5f7803c6bfbe373ce01062a026742e9781439 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Wed, 21 Aug 2013 16:23:22 -0700 Subject: [PATCH 1/2] fix issue where _done.apply(self, hookArgs) throws error in IE 8 --- hooks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks.js b/hooks.js index f7fd0fc..00735f7 100644 --- a/hooks.js +++ b/hooks.js @@ -22,7 +22,7 @@ module.exports = { proto[name] = function () { var self = this - , hookArgs // arguments eventually passed to the hook - are mutable + , hookArgs = []// arguments eventually passed to the hook - are mutable , lastArg = arguments[arguments.length-1] , pres = this._pres[name] , posts = this._posts[name] @@ -38,6 +38,7 @@ module.exports = { , preArgs; if (_args.length && !(arguments[0] == null && typeof lastArg === 'function')) hookArgs = _args; + if (++_current < _total) { currPre = pres[_current] if (currPre.isAsync && currPre.length < 2) From cbb5e969265f8a95cb42245407773e4b68401bf8 Mon Sep 17 00:00:00 2001 From: Craig Condon Date: Wed, 21 Aug 2013 16:23:48 -0700 Subject: [PATCH 2/2] v bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a2d4a36..dcd5cf5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hooks", "description": "Adds pre and post hook functionality to your JavaScript methods.", - "version": "0.3.0", + "version": "0.3.1", "keywords": [ "node", "hooks",