Browse Source

:bug: catching edge case for undefined hero object

tags/0.9.0
J 5 years ago
parent
commit
da406d3041
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      vue-theme/src/store/index.js

+ 2
- 0
vue-theme/src/store/index.js View File

@@ -30,6 +30,8 @@ const state = {
30 30
 
31 31
 const mutations = {
32 32
   SET_HERO(state, hero) {
33
+    if(!hero) return
34
+    
33 35
     if (hero.url) {
34 36
       state.hero.text = state.hero.url = hero.url
35 37
     } else {

Loading…
Cancel
Save