Skip to content

Commit 2236236

Browse files
committed
Add check to see if $root.auth_token is not an empty string to avoid error message in console
1 parent ed7aa9e commit 2236236

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ export default {
6969
const user = this.$root.auth_token
7070
? this.$jwt.decode(this.$root.auth_token).email
7171
: false;
72-
const role = this.$jwt.decode(this.$root.auth_token).type || '';
72+
const role = this.$root.auth_token
73+
? this.$jwt.decode(this.$root.auth_token).type
74+
: '';
7375
return {
7476
user,
7577
navBar,

0 commit comments

Comments
 (0)