diff --git a/packages/runtime-core/src/helpers/renderList.ts b/packages/runtime-core/src/helpers/renderList.ts index ea0b6f89..43841f31 100644 --- a/packages/runtime-core/src/helpers/renderList.ts +++ b/packages/runtime-core/src/helpers/renderList.ts @@ -16,13 +16,10 @@ export function renderList( } } else if (isObject(source)) { if (source[Symbol.iterator as any]) { - ret = [] - const iterator: Iterator = source[Symbol.iterator as any]() - let result = iterator.next() - while (!result.done) { - ret.push(renderItem(result.value, ret.length)) - result = iterator.next() - } + ret = Array.from( + source as Iterable, + renderItem + ) } else { const keys = Object.keys(source) ret = new Array(keys.length)