Skip to content

Commit

Permalink
fix: selector handling
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpagan committed Oct 20, 2023
1 parent 4f33b0b commit 7eb4a25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function init(element) {
}
}

async function render({ source, element, data, key, index, currentIndex, update, remove }) {
async function render({ source, element, selector, data, key, index, currentIndex, update, remove }) {
if (!element) {
if (source) {
element = queryElements({ element: source, prefix: 'render' })
Expand All @@ -64,7 +64,8 @@ async function render({ source, element, data, key, index, currentIndex, update,
if (!element) {
element = source.querySelector('template, [template], .template, [render]');
}
}
} else if (selector)
element = queryElements({ selector })

if (!element) return;
}
Expand Down

0 comments on commit 7eb4a25

Please sign in to comment.