fix(vue-app): handle promise rejection from asyncData (#18585)

This commit is contained in:
Rafał Chłodnicki 2023-02-21 11:04:19 +01:00 committed by GitHub
parent 751b784d21
commit 6fa5fc2fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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