mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
chore(vue-app): pass error as param to nuxt-loading fail method (#6939)
This commit is contained in:
parent
2df3ec4ea3
commit
e271aa0a0a
@ -178,7 +178,7 @@ export default {
|
||||
try {
|
||||
await Promise.all(promises)
|
||||
} catch (error) {
|
||||
<% if (loading) { %>this.$loading.fail()<% } %>
|
||||
<% if (loading) { %>this.$loading.fail(error)<% } %>
|
||||
globalHandleError(error)
|
||||
this.error(error)
|
||||
}
|
||||
@ -189,7 +189,7 @@ export default {
|
||||
errorChanged () {
|
||||
if (this.nuxt.err && this.$loading) {
|
||||
if (this.$loading.fail) {
|
||||
this.$loading.fail()
|
||||
this.$loading.fail(this.nuxt.err)
|
||||
}
|
||||
if (this.$loading.finish) {
|
||||
this.$loading.finish()
|
||||
|
@ -88,7 +88,7 @@ export default {
|
||||
}, 500)
|
||||
return this
|
||||
},
|
||||
fail () {
|
||||
fail (error) {
|
||||
this.canSucceed = false
|
||||
return this
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user