mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
fix(nuxt-error): prevent duplicate errors
also hides 404s from ssr
This commit is contained in:
parent
e5a516bfaf
commit
6394639091
@ -33,27 +33,6 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
<% if(debug) { %>
|
|
||||||
// Only on debug mode
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
mounted: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.mounted = true
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
console.error(this.error)
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
error(newErr) {
|
|
||||||
if(newErr) {
|
|
||||||
console.error(newErr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
<% } %>
|
|
||||||
computed: {
|
computed: {
|
||||||
statusCode () {
|
statusCode () {
|
||||||
return (this.error && this.error.statusCode) || 500
|
return (this.error && this.error.statusCode) || 500
|
||||||
|
Loading…
Reference in New Issue
Block a user