diff --git a/client/src/utils/css-help.ts b/client/src/utils/css-help.ts index 8c76eb778c..f7fad182b1 100644 --- a/client/src/utils/css-help.ts +++ b/client/src/utils/css-help.ts @@ -87,7 +87,7 @@ class CSSHelp { "link[href*='styles']" ); const style: HTMLStyleElement | null = this.doc?.querySelector('style'); - if (link) { + if (link?.sheet?.cssRules?.length) { return link.sheet; } else if (style) { return style.sheet;