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

其他史selecteds为空bug修改

zhouna пре 6 година
родитељ
комит
9378eb8bfc
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      src/store/reducers/homePage.js
  2. 1 1
      src/store/reducers/otherHistory.js

+ 1 - 1
src/store/reducers/homePage.js

@@ -44,7 +44,7 @@ export default function (state=initState,action) {
     case SETOTHERHISTORY:
       res.initData.otherHis = action.data;
       res.initData.otherHisSave = action.save;
-      res.initData.otherSelecteds = action.selecteds;
+      res.initData.otherSelecteds = action.selecteds||[];
       res.initData.otherIsHis = action.otherIsHis!=undefined?action.otherIsHis:true;
       return res;
     /*case SETTEXTFOCUS:

+ 1 - 1
src/store/reducers/otherHistory.js

@@ -17,7 +17,7 @@ export default function(state=initState,action){//console.log(state)
   switch (action.type){
     case SETDATA:
       res.data = action.data;
-      res.selecteds = action.selecteds;
+      res.selecteds = action.selecteds||[];
       res.saveText = action.save||[];
       res.isEmpty = action.isEmpty;
       return res;