Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Apr 25, 2024
1 parent 1920756 commit 08a5aba
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions src/tss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,43 +278,31 @@ function createTss_internal<
"get": (_target, ruleName) => {
/* prettier-ignore */
if (typeof ruleName === "symbol") {
assert(false);
}
assert(false);
}

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

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

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

/* prettier-ignore */
nestedSelectorUsageTrackRecord.push(wrap);
}
/* prettier-ignore */
nestedSelectorUsageTrackRecord.push(wrap);
}

/* prettier-ignore */
wrap.nestedSelectorRuleNames.add(ruleName);
}

if (
/* prettier-ignore */
nestedSelectorUsageTrackRecord.find(
wrap =>
wrap.name === name &&
wrap.idOfUseStyles !== idOfUseStyles &&
wrap.nestedSelectorRuleNames.has(ruleName)
) !== undefined
nestedSelectorUsageTrackRecord.find(wrap => wrap.name === name && wrap.idOfUseStyles !== idOfUseStyles && wrap.nestedSelectorRuleNames.has(ruleName)) !== undefined
) {
throw new Error(
[
Expand All @@ -332,11 +320,7 @@ function createTss_internal<
}

/* prettier-ignore */
return (
refClassesCache[ruleName]
=
`${cache.key}-${idOfUseStyles}${name !== undefined ? `-${name}` : ""}-${ruleName}-ref`
);
return (refClassesCache[ruleName] = `${cache.key}-${idOfUseStyles}${name !== undefined ? `-${name}` : ""}-${ruleName}-ref`);
}
})
})
Expand Down

0 comments on commit 08a5aba

Please sign in to comment.