mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +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: {
|
||||
statusCode () {
|
||||
return (this.error && this.error.statusCode) || 500
|
||||
@ -79,7 +58,7 @@ export default {
|
||||
font-weight: 100 !important;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -93,7 +72,7 @@ export default {
|
||||
font-size: 1.5rem;
|
||||
margin-top: 15px;
|
||||
color: #47494E;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.__nuxt-error-page .description {
|
||||
color: #7F828B;
|
||||
|
Loading…
Reference in New Issue
Block a user