Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into fb-dia-474/projects-col
Browse files Browse the repository at this point in the history
  • Loading branch information
yyassi-heartex authored Jan 2, 2024
2 parents ce4d86e + 98b229d commit ed5ec11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/bem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ const assembleClass = (block: string, elem?: string, mix?: CNMix | CNMix[], mod?
}

const attachNamespace = (cls: string) => {
if (new RegExp(CSS_PREFIX).test(cls)) return cls;
else return `${CSS_PREFIX}${cls}`;
if (typeof cls !== 'string') console.error('Non-string classname: ', cls);
return String(cls).startsWith(CSS_PREFIX) ? cls : `${CSS_PREFIX}${cls}`;
};

return finalClass.map(attachNamespace).join(" ");
Expand Down

0 comments on commit ed5ec11

Please sign in to comment.