Skip to content

Commit

Permalink
docs(doc): migration tool compat leancloud cn output file
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Dec 22, 2020
1 parent a4548a9 commit 1f25902
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/.vuepress/components/MigrationTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,12 @@ export default {
}
if(from === 'valine') {
val = JSON.parse(val);
//适配 LeanCloud 国内版导出非标准 JSON 情况
if(val.match(/},$/)) {
val = JSON.parse(val);
} else {
val = JSON.parse(`{"results":[ ${val.split(/[\r\n]+/).join(',')} ]}`);
}
}
const act = m[from][to];
Expand Down

0 comments on commit 1f25902

Please sign in to comment.