Skip to content

Commit

Permalink
Fix error introduced with #212 patch followup
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Apr 30, 2024
1 parent 3d788ed commit 5f68674
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/tss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ let counter = 0;
const nestedSelectorUsageTrackRecord: {
name: string;
nestedSelectorRuleNames: Set<string>;
idOfUseStyles: string;
}[] = [];

function createTss_internal<
Expand Down Expand Up @@ -325,13 +326,13 @@ function createTss_internal<
}

/* prettier-ignore */
let wrap = nestedSelectorUsageTrackRecord.find(wrap => wrap.name === name);
let wrap = nestedSelectorUsageTrackRecord.find(wrap => wrap.name === name && wrap.idOfUseStyles === idOfUseStyles);

/* prettier-ignore */
if (wrap === undefined) {

/* prettier-ignore */
wrap = { name, "nestedSelectorRuleNames": new Set() };
wrap = { name, idOfUseStyles, "nestedSelectorRuleNames": new Set() };

/* prettier-ignore */
nestedSelectorUsageTrackRecord.push(wrap);
Expand All @@ -353,6 +354,8 @@ function createTss_internal<
wrap =>
wrap.name ===
name &&
wrap.idOfUseStyles !==
idOfUseStyles &&
wrap.nestedSelectorRuleNames.has(
ruleName
)
Expand Down

0 comments on commit 5f68674

Please sign in to comment.