mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-29 18:30:10 +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 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
|
a.post = res
|
||||||
|
|
||||||
// reset the result...
|
// reset the result...
|
||||||
|
// NOTE: this is the only difference between this
|
||||||
|
// and wrapper stages...
|
||||||
res = context
|
res = context
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -465,6 +470,7 @@ Action.prototype.pre = function(context, args){
|
|||||||
|
|
||||||
// return context if nothing specific is returned...
|
// return context if nothing specific is returned...
|
||||||
res = res === undefined ? context : res
|
res = res === undefined ? context : res
|
||||||
|
res = res === UNDEFINED ? undefined : res
|
||||||
|
|
||||||
return {
|
return {
|
||||||
arguments: args,
|
arguments: args,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ig-actions",
|
"name": "ig-actions",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "actions.js",
|
"main": "actions.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user