瀏覽代碼

: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,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…
取消
儲存