mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 08:31:38 +00:00
added .catch(..) to hidden promise, still thinking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7c3b470575
commit
0108999fac
8
pwiki.js
8
pwiki.js
@ -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...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user