fix: link import bug (#42266)

Fix a small bug in the CSS helper tool.
pull/42271/head
Nicholas Carrigan (he/him) 2021-05-26 23:46:23 -07:00 committed by GitHub
parent 6e86d4fe08
commit 00b76c0389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;