Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored and astrobot-houston committed Sep 6, 2023
1 parent a525d5d commit 8a08cb8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/integrations/solid/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ export default (element: HTMLElement) =>
let _slots: Record<string, any> = {};
if (Object.keys(slotted).length > 0) {
// hydratable
if (client !== "only") {
if (client !== 'only') {
const iterator = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, (node) => {
if (node === element) return NodeFilter.FILTER_SKIP
if (node.nodeName === "ASTRO-SLOT") return NodeFilter.FILTER_ACCEPT;
if (node.nodeName === "ASTRO-ISLAND") return NodeFilter.FILTER_REJECT;
return NodeFilter.FILTER_SKIP;
});
while(slot = iterator.nextNode() as HTMLElement | null)
_slots[slot.getAttribute("name") || "default"] = slot;
if (node === element) return NodeFilter.FILTER_SKIP;
if (node.nodeName === 'ASTRO-SLOT') return NodeFilter.FILTER_ACCEPT;
if (node.nodeName === 'ASTRO-ISLAND') return NodeFilter.FILTER_REJECT;
return NodeFilter.FILTER_SKIP;
});
while ((slot = iterator.nextNode() as HTMLElement | null))
_slots[slot.getAttribute('name') || 'default'] = slot;
}
for (const [key, value] of Object.entries(slotted)) {
if (_slots[key]) continue;
Expand Down

0 comments on commit 8a08cb8

Please sign in to comment.