Skip to content

Commit 0ca5d8b

Browse files
committed
Added finally
1 parent 0006795 commit 0ca5d8b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/promise.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,12 +430,14 @@
430430

431431
/**
432432
* Add handlers to be called when the Promise object is rejected.
433+
*
433434
* @param {Function} rejectedCallback Function that is called when this
434-
* Promise is rejected with an error.
435+
* Promise is rejected with an error.
435436
* @return {AV.Promise} A new Promise that will be fulfilled after this
436-
* Promise is fulfilled and either callback has completed. If the callback
437+
* Promise is fulfilled and either callback has completed. If the callback
437438
* returned a Promise, then this Promise will not be fulfilled until that
438-
* one is.
439+
* one is.
440+
* @function
439441
*/
440442
catch: function(onRejected) {
441443
return this.then(undefined, onRejected);
@@ -533,4 +535,11 @@
533535

534536
});
535537

538+
/**
539+
* Alias of AV.Promise.prototype.always
540+
* @function
541+
* @see AV.Promise#always
542+
*/
543+
AV.Promise.prototype.finally = AV.Promise.prototype.always;
544+
536545
}(this));

0 commit comments

Comments
 (0)