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