Ver código fonte

其他史selecteds为空bug修改

zhouna 6 anos atrás
pai
commit
9378eb8bfc

+ 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;