Procházet zdrojové kódy

:bug: catching edge case for undefined hero object

tags/0.9.0
J před 5 roky
rodič
revize
da406d3041
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2
    0
      vue-theme/src/store/index.js

+ 2
- 0
vue-theme/src/store/index.js Zobrazit soubor

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

Načítá se…
Zrušit
Uložit