fix(nuxt-error): always show errors in debug more

SPA mode in debug mode when error is not globally handled (thrown by other nuxt functions) there is no error at all in console logs
This commit is contained in:
Pooya Parsa 2017-09-05 23:35:04 +04:30
parent 888b141a27
commit 251d87914d

View File

@ -34,6 +34,7 @@ export default {
} }
}, },
<% if(debug) { %> <% if(debug) { %>
// Only on debug mode
data () { data () {
return { return {
mounted: false mounted: false
@ -42,6 +43,16 @@ export default {
mounted () { mounted () {
this.mounted = true this.mounted = true
}, },
created () {
console.error(this.error)
},
watch: {
error(newErr) {
if(newErr) {
console.error(newErr)
}
}
},
<% } %> <% } %>
computed: { computed: {
statusCode () { statusCode () {