fix(nuxt-error): prevent duplicate errors

also hides 404s from ssr
This commit is contained in:
Pooya Parsa 2018-03-19 21:33:54 +03:30
parent e5a516bfaf
commit 6394639091

View File

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