mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(vue-app): handle promise rejection from asyncData
(#18585)
This commit is contained in:
parent
751b784d21
commit
6fa5fc2fa0
@ -318,7 +318,7 @@ const render404Page = () => {
|
||||
// Call asyncData(context)
|
||||
if (Component.options.asyncData && typeof Component.options.asyncData === 'function') {
|
||||
const promise = promisify(Component.options.asyncData, app.context)
|
||||
promise.then((asyncDataResult) => {
|
||||
.then((asyncDataResult) => {
|
||||
ssrContext.asyncData[Component.cid] = asyncDataResult
|
||||
applyAsyncData(Component)
|
||||
return asyncDataResult
|
||||
|
Loading…
Reference in New Issue
Block a user