2
0
mirror of https://github.com/tenrok/vue-json-viewer.git synced 2026-06-05 16:42:30 +03:00

fix: empty array show an undefined

This commit is contained in:
陈峰
2019-09-25 09:17:36 +08:00
parent 8953e9d1da
commit e656feecac
+2 -3
View File
@@ -49,9 +49,8 @@ export default {
this.value = [];
}
setTimeout(() => {
this.value.push(vals[index]);
if (this.value.length < vals.length) {
if (vals.length > index) {
this.value.push(vals[index]);
this.setValue(vals, index + 1);
}
}, 0);