summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2023-09-06 22:25:23 +0000
committerGravatar astrobot-houston <fred+astrobot@astro.build> 2023-09-06 22:25:23 +0000
commit8a08cb8d2a5ba3fb70608207558e58fdcc5f5193 (patch)
tree8851fca103cfe5707f0c3995da32ea25308cb69c
parenta525d5db1746ea6b79fced2a967b82c778320dbf (diff)
downloadastro-8a08cb8d2a5ba3fb70608207558e58fdcc5f5193.tar.gz
astro-8a08cb8d2a5ba3fb70608207558e58fdcc5f5193.tar.zst
astro-8a08cb8d2a5ba3fb70608207558e58fdcc5f5193.zip
[ci] format
-rw-r--r--packages/integrations/solid/src/client.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/integrations/solid/src/client.ts b/packages/integrations/solid/src/client.ts
index 09c5efa3d..58f41160d 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<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;