Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/bluebird/js/main/finally.js')
-rw-r--r--node_modules/bluebird/js/main/finally.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/node_modules/bluebird/js/main/finally.js b/node_modules/bluebird/js/main/finally.js
index ed84a2a1f..c9342bcf2 100644
--- a/node_modules/bluebird/js/main/finally.js
+++ b/node_modules/bluebird/js/main/finally.js
@@ -1,7 +1,6 @@
"use strict";
module.exports = function(Promise, NEXT_FILTER, tryConvertToPromise) {
var util = require("./util.js");
-var wrapsPrimitiveReceiver = util.wrapsPrimitiveReceiver;
var isPrimitive = util.isPrimitive;
var thrower = util.thrower;
@@ -23,7 +22,7 @@ function throw$(r) {
}
function promisedFinally(ret, reasonOrValue, isFulfilled) {
var then;
- if (wrapsPrimitiveReceiver && isPrimitive(reasonOrValue)) {
+ if (isPrimitive(reasonOrValue)) {
then = isFulfilled ? return$(reasonOrValue) : throw$(reasonOrValue);
} else {
then = isFulfilled ? returnThis : throwThis;
@@ -36,7 +35,7 @@ function finallyHandler(reasonOrValue) {
var handler = this.handler;
var ret = promise._isBound()
- ? handler.call(promise._boundTo)
+ ? handler.call(promise._boundValue())
: handler();
if (ret !== undefined) {
@@ -61,7 +60,7 @@ function tapHandler(value) {
var handler = this.handler;
var ret = promise._isBound()
- ? handler.call(promise._boundTo, value)
+ ? handler.call(promise._boundValue(), value)
: handler(value);
if (ret !== undefined) {