Kaynağa Gözat

:bug: catching edge case for undefined hero object

tags/0.9.0
J 5 yıl önce
ebeveyn
işleme
da406d3041
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2
    0
      vue-theme/src/store/index.js

+ 2
- 0
vue-theme/src/store/index.js Dosyayı Görüntüle

@@ -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…
İptal
Kaydet