fix(v-memo): should work on v-for with constant expression (#4272)

fix #4246
This commit is contained in:
edison
2021-08-07 09:37:09 +08:00
committed by GitHub
parent c421fb91b2
commit 3b60358d0e
2 changed files with 23 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ export function renderList(
}
ret = new Array(source)
for (let i = 0; i < source; i++) {
ret[i] = renderItem(i + 1, i)
ret[i] = renderItem(i + 1, i, undefined, cached && cached[i])
}
} else if (isObject(source)) {
if (source[Symbol.iterator as any]) {