From 6f73b65d530ad8d2e8297af179e111f401823bce Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 20 Oct 2023 10:34:29 -0500 Subject: [PATCH] Revert "Check cssRules before css variables are read from stylesheet (#2454)" This reverts commit fa79c358c09cb52ed142ef122e08b77de880685d. --- src/app/shared/sass-helper/css-variable.service.ts | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/app/shared/sass-helper/css-variable.service.ts b/src/app/shared/sass-helper/css-variable.service.ts index ca6384e0ee5..0190a05036f 100644 --- a/src/app/shared/sass-helper/css-variable.service.ts +++ b/src/app/shared/sass-helper/css-variable.service.ts @@ -26,15 +26,6 @@ export class CSSVariableService { return styleSheet.href.indexOf(window.location.origin) === 0; }; - /** - * Checks whether the specific stylesheet object has the property cssRules - * @param styleSheet The stylesheet - */ - hasCssRules = (styleSheet) => { - // Injected styles might have no css rules value - return styleSheet.hasOwnProperty('cssRules') && styleSheet.cssRules; - }; - /* Determine if the given rule is a CSSStyleRule See: https://developer.mozilla.org/en-US/docs/Web/API/CSSRule#Type_constants @@ -102,10 +93,8 @@ export class CSSVariableService { if (isNotEmpty(document.styleSheets)) { // styleSheets is array-like, so we convert it to an array. // Filter out any stylesheets not on this domain - // Filter out any stylesheets that have no cssRules property return [...document.styleSheets] .filter(this.isSameDomain) - .filter(this.hasCssRules) .reduce( (finalArr, sheet) => finalArr.concat(