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

Fixed slice on delete reducer

Fela Maslen пре 7 година
родитељ
комит
c0777fe0ab
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/reducers/crud.js

+ 1 - 1
src/reducers/crud.js

@@ -42,7 +42,7 @@ function updateDoc(routeDocs, index, id, pending, fields = {}) {
 }
 
 function deleteDoc(docs, index) {
-    return docs.slice(0, index - 1)
+    return docs.slice(0, index)
         .concat(docs.slice(index + 1));
 }