Просмотр исходного кода

:bug: catching edge case for undefined hero object

tags/0.9.0
J 5 лет назад
Родитель
Сommit
da406d3041
1 измененных файлов: 2 добавлений и 0 удалений
  1. 2
    0
      vue-theme/src/store/index.js

+ 2
- 0
vue-theme/src/store/index.js Просмотреть файл

@@ -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 {

Загрузка…
Отмена
Сохранить