Skip to content

Commit

Permalink
fix: detect default classes from the new 'DEFAULT' string
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Jan 2, 2021
1 parent 6acb30b commit b14973a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/utils/generateTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function generateTypes(classnames: string[], prefix?: string): string {

return classnamesThatShouldKeepTheDefaultSuffix.map(x => {
const shouldKeepDefaultSuffix: boolean = classname.includes(x);
const name = shouldKeepDefaultSuffix ? classname : classname.replace('-default', '');
const name = shouldKeepDefaultSuffix ? classname : classname.replace('-DEFAULT', '');

return prefix ? `'${prefix}${name}'` : `'${name}'`;
});
Expand Down

0 comments on commit b14973a

Please sign in to comment.