mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
Improve error handling when string
This commit is contained in:
parent
4cbd6d6a28
commit
615bcae90c
@ -68,6 +68,9 @@ const app = {
|
|||||||
err: null,
|
err: null,
|
||||||
error (err) {
|
error (err) {
|
||||||
err = err || null
|
err = err || null
|
||||||
|
if (typeof err === 'string') {
|
||||||
|
err = { statusCode: 500, message: err }
|
||||||
|
}
|
||||||
this.$options._nuxt.err = err;
|
this.$options._nuxt.err = err;
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user