From e656feecac7dd11dc61da832610e993df21a4b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B3=B0?= Date: Wed, 25 Sep 2019 09:17:36 +0800 Subject: [PATCH] fix: empty array show an undefined --- lib/types/json-array.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/types/json-array.vue b/lib/types/json-array.vue index 96b06e7..e030fa0 100644 --- a/lib/types/json-array.vue +++ b/lib/types/json-array.vue @@ -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);