From 6294d5f942ea9a16ae9c8eecb05d0c5b749b951b Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Sat, 4 Aug 2018 09:01:31 +0200 Subject: [PATCH] style: prettier --- ext/promise.js | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/ext/promise.js b/ext/promise.js index ae6c4b5..b64f7f2 100644 --- a/ext/promise.js +++ b/ext/promise.js @@ -66,12 +66,8 @@ require("../lib/registered-extensions").promise = function (mode, conf) { if (resolvedMode === "then") { promise.then( - function (result) { - nextTick(onSuccess.bind(this, result)); - }, - function () { - nextTick(onFailure); - } + function (result) { nextTick(onSuccess.bind(this, result)); }, + function () { nextTick(onFailure); } ); } else if (resolvedMode === "done") { // Not recommended, as it may mute any eventual "Unhandled error" events @@ -110,15 +106,11 @@ require("../lib/registered-extensions").promise = function (mode, conf) { return; } promise = promises[id]; - var emit = function () { - conf.emit("getasync", id, args, context); - }; + var emit = function () { conf.emit("getasync", id, args, context); }; if (isPromise(promise)) { if (typeof promise.done === "function") promise.done(emit); else { - promise.then(function () { - nextTick(emit); - }); + promise.then(function () { nextTick(emit); }); } } else { emit(); @@ -144,11 +136,6 @@ require("../lib/registered-extensions").promise = function (mode, conf) { cache = create(null); waiting = create(null); promises = create(null); - conf.emit( - "clearasync", - objectMap(oldCache, function (data) { - return [data]; - }) - ); + conf.emit("clearasync", objectMap(oldCache, function (data) { return [data]; })); }); };