diff --git a/actions.js b/actions.js index 1a40edb..1a64dca 100755 --- a/actions.js +++ b/actions.js @@ -538,8 +538,13 @@ Action.prototype.chainApply = function(context, inner, args){ context[inner].chainApply(context, null, args) : undefined + // call the resulting function... + if(res instanceof Function){ + res.apply(context, [context].concat(args)) + data.result = context + // push the inner result into the chian... - if(res !== undefined){ + } else if(res !== undefined){ data.result = res } } diff --git a/package.json b/package.json index bcae4c2..63af4db 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "1.7.0", + "version": "1.7.1", "description": "", "main": "actions.js", "scripts": {