From 50c94b8384181626aeb46bda906100c8685f19c5 Mon Sep 17 00:00:00 2001 From: Roman Melnyk Date: Tue, 20 Sep 2022 18:23:29 +0300 Subject: [PATCH] #321 Fix invalid non array styleSheets item. --- lib/util/stylesheet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util/stylesheet.js b/lib/util/stylesheet.js index 09811e9..f8bfa21 100644 --- a/lib/util/stylesheet.js +++ b/lib/util/stylesheet.js @@ -29,10 +29,10 @@ StyleSheets.prototype.markAsUsed = function (fullyQualifiedName) { const nameSplit = fullyQualifiedName.split('.'); const styleSheetName = nameSplit[0]; const styleSheetProperty = nameSplit[1]; + const styleSheet = this.styleSheets[styleSheetName]; - if (this.styleSheets[styleSheetName]) { - this.styleSheets[styleSheetName] = this - .styleSheets[styleSheetName] + if (Array.isArray(styleSheet)) { + this.styleSheets[styleSheetName] = styleSheet .filter((property) => property.key.name !== styleSheetProperty); } }; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy