diff --git a/src/lib/codegenerator/generator.js b/src/lib/codegenerator/generator.js index 648a4f3f..fc562e76 100644 --- a/src/lib/codegenerator/generator.js +++ b/src/lib/codegenerator/generator.js @@ -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