Skip to content

Commit d9f84d7

Browse files
committed
fix: Hopefully fix tests in CI
1 parent 45c0009 commit d9f84d7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/blockly/core/renderers/common/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,8 @@ export class ConstantProvider {
11241124
* @param selector The CSS selector to interpolate into the stylesheet.
11251125
*/
11261126
protected injectCSS_(root: Document | ShadowRoot, selector: string) {
1127+
if (typeof window === 'undefined' || !window.CSSStyleSheet) return;
1128+
11271129
const sheet = new CSSStyleSheet();
11281130
sheet.replaceSync(this.getCSS_(selector).join('\n'));
11291131
root.adoptedStyleSheets.push(sheet);

0 commit comments

Comments
 (0)