Skip to content

Commit

Permalink
fix(css-render): limit the scope of the style query (#1102)
Browse files Browse the repository at this point in the history
Co-authored-by: knight.chen <knightch@knx.com.cn>
  • Loading branch information
keuby and knight.chen committed Apr 23, 2023
1 parent 1a07cba commit 794d6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/css-render/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function removeElement (el: HTMLStyleElement | null): void {
}

export function queryElement (id: string): HTMLStyleElement | null {
return document.querySelector(`style[cssr-id="${id}"]`)
return document.head.querySelector(`style[cssr-id="${id}"]`)
}

export function createElement (id: string): HTMLStyleElement {
Expand Down

1 comment on commit 794d6ac

@vercel
Copy link

@vercel vercel bot commented on 794d6ac Apr 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

css-render – ./

css-render-git-master-07akioni.vercel.app
css-render-07akioni.vercel.app
css-render.vercel.app

Please sign in to comment.