Skip to content

Commit

Permalink
Intellicode#321 Fix invalid non array styleSheets item.
Browse files Browse the repository at this point in the history
  • Loading branch information
Romick2005 committed Sep 20, 2022
1 parent 7fdaedc commit 50c94b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/util/stylesheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
Expand Down

0 comments on commit 50c94b8

Please sign in to comment.