Преглед изворни кода

:bug: catching edge case for undefined hero object

tags/0.9.0
J пре 5 година
родитељ
комит
da406d3041
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2
    0
      vue-theme/src/store/index.js

+ 2
- 0
vue-theme/src/store/index.js Прегледај датотеку

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

Loading…
Откажи
Сачувај