Skip to content

Commit

Permalink
Reverted change related to reactivity for (initially) empty for-loops…
Browse files Browse the repository at this point in the history
… as it's causing other issues.
  • Loading branch information
michielvandergeest committed Jan 29, 2024
1 parent c079108 commit 493b3be
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/lib/codegenerator/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ const generateForLoopCode = function (templateObject, parent) {
ctx.renderCode.push(`
const collection = ${cast(result[2], ':for')}
const keys = []
// if array is empty push an empty object to properly set up reactivity
if(collection.length === 0) {
collection.push({})
}
for(let __index = 0; __index < collection.length; __index++) {
parent = ${parent}
if(!component.key) keys.length = 0
Expand Down

0 comments on commit 493b3be

Please sign in to comment.