mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
Fix codestyle
This commit is contained in:
parent
c22b0b790b
commit
1ba4adca70
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user