mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-28 18:00:11 +00:00
added undefined placeholder to force returning undefined...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
79cd6bef51
commit
ed98d85724
@ -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,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-actions",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "",
|
||||
"main": "actions.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user