From 8a08cb8d2a5ba3fb70608207558e58fdcc5f5193 Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Wed, 6 Sep 2023 22:25:23 +0000 Subject: [PATCH] [ci] format --- packages/integrations/solid/src/client.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/integrations/solid/src/client.ts b/packages/integrations/solid/src/client.ts index 09c5efa3d7..58f41160da 100644 --- a/packages/integrations/solid/src/client.ts +++ b/packages/integrations/solid/src/client.ts @@ -14,15 +14,15 @@ export default (element: HTMLElement) => let _slots: Record = {}; 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;