Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Jan 5, 2025
1 parent e9200ee commit 9a50338
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/js/core/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ export function addScopeToCss(css, scopeSelector) {
*/
export function addScopeToCssLegacy(css, scopeSelector) {
const stylesheet = new CSSStyleSheet();
// nodejs must fall back to the normal version of the function
if (typeof stylesheet.replaceSync === 'undefined') {
return addScopeToCss(css, scopeSelector);
}
stylesheet.replaceSync(css);
const newCSSRules = [];
for (const cssRule of stylesheet.cssRules) {
Expand Down

0 comments on commit 9a50338

Please sign in to comment.