From 00b76c03892f3bb2a9634aba6c681385c906810b Mon Sep 17 00:00:00 2001 From: "Nicholas Carrigan (he/him)" Date: Wed, 26 May 2021 23:46:23 -0700 Subject: [PATCH] fix: link import bug (#42266) Fix a small bug in the CSS helper tool. --- client/src/utils/css-help.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;