Skip to content

Commit

Permalink
Fix validation of loading UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonmade committed Sep 23, 2024
1 parent e991d19 commit 6861b9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-pots-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@watching/tools': patch
---

Fix validation of loading UI
6 changes: 3 additions & 3 deletions packages/tools/source/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export async function validateAndNormalizeLoadingUI(ui: string) {

// TODO: more validation
for (const element of html.querySelectorAll('*')) {
const tagName = element.tagName;
const localName = element.localName;

if (!ALLOWED_LOADING_ELEMENTS.has(tagName as any)) {
throw new Error(`Unknown loading element: ${tagName}`);
if (!ALLOWED_LOADING_ELEMENTS.has(localName as any)) {
throw new Error(`Unknown loading element: ${localName}`);
}
}

Expand Down

0 comments on commit 6861b9c

Please sign in to comment.