Explorar o código

其他史selecteds为空bug修改

zhouna %!s(int64=6) %!d(string=hai) anos
pai
achega
9378eb8bfc
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  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;