mirror of
https://github.com/BreizhHardware/memoizee.git
synced 2026-03-18 21:40:27 +01:00
style: prettier
This commit is contained in:
@@ -65,13 +65,10 @@ require("../lib/registered-extensions").promise = function (mode, conf) {
|
|||||||
if (!resolvedMode) resolvedMode = "then";
|
if (!resolvedMode) resolvedMode = "then";
|
||||||
|
|
||||||
if (resolvedMode === "then") {
|
if (resolvedMode === "then") {
|
||||||
var nextTickFailure = function () {
|
var nextTickFailure = function () { nextTick(onFailure); };
|
||||||
nextTick(onFailure);
|
promise.then(function (result) {
|
||||||
};
|
nextTick(onSuccess.bind(this, result));
|
||||||
promise.then(
|
}, nextTickFailure);
|
||||||
function (result) { nextTick(onSuccess.bind(this, result)); },
|
|
||||||
nextTickFailure
|
|
||||||
);
|
|
||||||
// If `finally` is a function we attach to it to remove cancelled promises.
|
// If `finally` is a function we attach to it to remove cancelled promises.
|
||||||
if (typeof promise.finally === "function") {
|
if (typeof promise.finally === "function") {
|
||||||
promise.finally(nextTickFailure);
|
promise.finally(nextTickFailure);
|
||||||
|
|||||||
Reference in New Issue
Block a user