Skip to content

Commit

Permalink
feat: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
nuintun committed Nov 18, 2024
1 parent eb28d64 commit 1859ad8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/js/hooks/createStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ const CSSVarRegister = memo(function CSSVarRegister(props: CSSVarRegisterProps):

if (shared) {
for (const component of shared) {
const componentToken = token[component];
const sharedToken = token[component];

if (componentToken) {
const entries = Object.entries(componentToken) as Entries<string | number | boolean>;
if (sharedToken) {
const entries = Object.entries(sharedToken) as Entries<string | number | boolean>;

for (const [key, realToken] of entries) {
if (isString(realToken) || isNumber(realToken)) {
const globalToken = token[key];

if (globalToken !== realToken) {
if (realToken !== globalToken) {
scopeToken[globalToken != null ? key : prefixToken(component, key)] = realToken;
}
}
Expand Down

0 comments on commit 1859ad8

Please sign in to comment.