diff --git a/lib/app/utils.js b/lib/app/utils.js index e782671b75..f6b34f0739 100644 --- a/lib/app/utils.js +++ b/lib/app/utils.js @@ -84,7 +84,7 @@ export function promisify (fn, context) { } else { promise = fn(context) } - if (!promise || (!(promise instanceof Promise) && (typeof promise.then !== 'function'))) + if (!promise || (!(promise instanceof Promise) && (typeof promise.then !== 'function'))) { promise = Promise.resolve(promise) } return promise diff --git a/lib/utils.js b/lib/utils.js index 185dc414f4..edea410fdb 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -52,7 +52,7 @@ export function promisifyRoute (fn) { }) } let promise = fn() - if (!promise || (!(promise instanceof Promise) && (typeof promise.then !== 'function'))) + if (!promise || (!(promise instanceof Promise) && (typeof promise.then !== 'function'))) { promise = Promise.resolve(promise) } return promise