mirror of
https://github.com/flynx/actions.js.git
synced 2025-10-30 02:40:10 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cbfed2936d
commit
79cd6bef51
18
actions.js
18
actions.js
@ -429,13 +429,11 @@ Action.prototype.pre = function(context, args){
|
|||||||
if(a.pre){
|
if(a.pre){
|
||||||
res = a.pre.call(context, outer, args)
|
res = a.pre.call(context, outer, args)
|
||||||
|
|
||||||
// if a handler returns a function or a deferred,
|
// if a handler returns a function register is as a post
|
||||||
// register is as a post handler...
|
// handler...
|
||||||
if(res
|
if(res
|
||||||
&& res !== context
|
&& res !== context
|
||||||
&& res instanceof Function){
|
&& res instanceof Function){
|
||||||
//&& (res instanceof Function
|
|
||||||
// || res.resolve instanceof Function)){
|
|
||||||
a.post = res
|
a.post = res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -451,13 +449,11 @@ Action.prototype.pre = function(context, args){
|
|||||||
if(a.pre){
|
if(a.pre){
|
||||||
res = a.pre.apply(context, args)
|
res = a.pre.apply(context, args)
|
||||||
|
|
||||||
// if a handler returns a function or a deferred,
|
// if a handler returns a function register is as a post
|
||||||
// register is as a post handler...
|
// handler...
|
||||||
if(res
|
if(res
|
||||||
&& res !== context
|
&& res !== context
|
||||||
&& res instanceof Function){
|
&& res instanceof Function){
|
||||||
//&& (res instanceof Function
|
|
||||||
// || res.resolve instanceof Function)){
|
|
||||||
a.post = res
|
a.post = res
|
||||||
|
|
||||||
// reset the result...
|
// reset the result...
|
||||||
@ -494,9 +490,6 @@ Action.prototype.post = function(context, data){
|
|||||||
.reverse()
|
.reverse()
|
||||||
.forEach(function(a){
|
.forEach(function(a){
|
||||||
a.post
|
a.post
|
||||||
//&& (a.post.resolve ?
|
|
||||||
// a.post.resolve.apply(a.post, args)
|
|
||||||
// : a.post.apply(context, args))
|
|
||||||
&& a.post.apply(context, args)
|
&& a.post.apply(context, args)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -506,9 +499,6 @@ Action.prototype.post = function(context, data){
|
|||||||
.reverse()
|
.reverse()
|
||||||
.forEach(function(a){
|
.forEach(function(a){
|
||||||
a.post
|
a.post
|
||||||
//&& (a.post.resolve ?
|
|
||||||
// a.post.resolve.apply(a.post, res, outer, args.slice(1))
|
|
||||||
// : a.post.call(context, res, outer, args.slice(1)))
|
|
||||||
&& a.post.call(context, res, outer, args.slice(1))
|
&& a.post.call(context, res, outer, args.slice(1))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user