added .catch(..) to hidden promise, still thinking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-10-05 06:23:30 +03:00
parent 7c3b470575
commit 0108999fac

View File

@ -1097,6 +1097,14 @@ module.hiddenPromise = {
}
return this
},
// NOTE: this ignores the function if there is no promise...
// XXX not sure if this is correct...
catch: function(func){
if(this.__promise != null){
this.__promise.catch(func)
}
return this
},
// Like then, but the function will get called only if a .then(..) is
// called right after...