Skip to content

Commit

Permalink
fix: double quote link element href as selector (#2865)
Browse files Browse the repository at this point in the history
* fix: double quote link element href as selector

* Create giant-geckos-love.md
  • Loading branch information
kuitos authored Dec 26, 2023
1 parent d592fbf commit c341664
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-geckos-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@qiankunjs/sandbox": patch
---

fix: double quote link element href as selector
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export function patchStandardSandbox(
const isElementExisted = (element: HTMLStyleElement | HTMLLinkElement) => {
if (container.contains(element)) return true;
if ('rel' in element && element.rel === 'stylesheet' && element.href)
return !!container.querySelector(`link[rel=stylesheet][href=${element.href}]`);
return !!container.querySelector(`link[rel=stylesheet][href="${element.href}"]`);
return false;
};

Expand Down

0 comments on commit c341664

Please sign in to comment.