diff --git a/actions.js b/actions.js index fd7af02..0f324c0 100755 --- a/actions.js +++ b/actions.js @@ -15,6 +15,9 @@ var object = require('ig-object') var args2array = function(a){ return [].slice.call(a) } +var UNDEFINED = +module.UNDEFINED = ['undefined placeholder'] + /*********************************************************************/ @@ -457,6 +460,8 @@ Action.prototype.pre = function(context, args){ a.post = res // reset the result... + // NOTE: this is the only difference between this + // and wrapper stages... res = context } } @@ -465,6 +470,7 @@ Action.prototype.pre = function(context, args){ // return context if nothing specific is returned... res = res === undefined ? context : res + res = res === UNDEFINED ? undefined : res return { arguments: args, diff --git a/package.json b/package.json index 20244bf..1519904 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-actions", - "version": "1.1.0", + "version": "1.2.0", "description": "", "main": "actions.js", "scripts": {