From 5f68674ab89fa71d6ba18f3e1fec4305b6580d1a Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Tue, 30 Apr 2024 19:34:09 +0200 Subject: [PATCH] Fix error introduced with #212 patch followup --- src/tss.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tss.ts b/src/tss.ts index f66793c..06ff84e 100644 --- a/src/tss.ts +++ b/src/tss.ts @@ -183,6 +183,7 @@ let counter = 0; const nestedSelectorUsageTrackRecord: { name: string; nestedSelectorRuleNames: Set; + idOfUseStyles: string; }[] = []; function createTss_internal< @@ -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); @@ -353,6 +354,8 @@ function createTss_internal< wrap => wrap.name === name && + wrap.idOfUseStyles !== + idOfUseStyles && wrap.nestedSelectorRuleNames.has( ruleName )