fix: link import bug (#42266)

Fix a small bug in the CSS helper tool.
This commit is contained in:
Nicholas Carrigan (he/him)
2021-05-26 23:46:23 -07:00
committed by GitHub
parent 6e86d4fe08
commit 00b76c0389

View File

@@ -87,7 +87,7 @@ class CSSHelp {
"link[href*='styles']" "link[href*='styles']"
); );
const style: HTMLStyleElement | null = this.doc?.querySelector('style'); const style: HTMLStyleElement | null = this.doc?.querySelector('style');
if (link) { if (link?.sheet?.cssRules?.length) {
return link.sheet; return link.sheet;
} else if (style) { } else if (style) {
return style.sheet; return style.sheet;