Skip to content

Commit 11c10aa

Browse files
authored
Make debug mode a constant
const debug = process.env.NODE_ENV !== 'production'
1 parent 2770546 commit 11c10aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/Header/Cart.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ export default {
6262
}
6363
},
6464
error(error) {
65+
const debug = process.env.NODE_ENV !== 'production'
6566
this.remoteError = error
6667
// Logs out an error in the console if we are in development mode
67-
if (process.env.NODE_ENV === 'development') {
68+
if (debug) {
6869
console.error(error)
6970
}
7071
// Check if we are in the browser before checking localStorage

0 commit comments

Comments
 (0)