Skip to content

Commit

Permalink
docs(doc): fix csv migration miss first line data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Dec 22, 2020
1 parent 1f25902 commit 3f7c3b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/.vuepress/components/MigrationTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ function lc2csv(input) {
index += 1;
});
const [_head, ...body] = input.results;
body.forEach(row => {
input.results.forEach(row => {
const id = getId(row);
if(id) {
row.id = keyMaps[ id ].toString();
Expand Down Expand Up @@ -276,6 +275,7 @@ export default {
if(from === 'valine') {
//适配 LeanCloud 国内版导出非标准 JSON 情况
val = val.trim();
if(val.match(/},$/)) {
val = JSON.parse(val);
} else {
Expand Down

0 comments on commit 3f7c3b3

Please sign in to comment.