diff options
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r-- | src/ClientUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts index 2b623625d..dc52218c5 100644 --- a/src/ClientUtils.ts +++ b/src/ClientUtils.ts @@ -462,7 +462,7 @@ export function addStyleSheetRule(sheet: CSSStyleSheet | null, selector: string, : Object.keys(css) .map(p => p + ':' + (p === 'content' ? "'" + css[p] + "'" : css[p])) .join(';'); - return sheet.insertRule(selectorPrefix + selector + '{' + propText + '}', sheet.cssRules.length); + return sheet?.insertRule(selectorPrefix + selector + '{' + propText + '}', sheet.cssRules.length); } export function removeStyleSheetRule(sheet: CSSStyleSheet | null, rule: number) { if (sheet?.rules.length) { |