Skip to content

Commit

Permalink
fix: clears render element if index = 0 and crate and update not true
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 19, 2023
1 parent b3e3977 commit 90e4946
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ async function renderTemplate(template, data, key, index, keyPath) {

if (!renderData) return

if (index === 0) {
let isInsert = data.$filter && (data.$filter.create || data.$filter.update)
if (!isInsert && index === 0) {
for (const [key, element] of template.clones) {
renderedNodes.delete(element)
element.remove()
Expand Down

0 comments on commit 90e4946

Please sign in to comment.