Skip to content

Commit

Permalink
chore: Code Optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jia-nan committed Sep 29, 2024
1 parent e7d1f36 commit 251c00e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils/expandUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,10 @@ export function computedExpandedClassName<RecordType>(
index: number,
indent: number,
) {
let resultClsName = '';
if (typeof cls === 'string') {
resultClsName = cls;
return cls;
}
if (typeof cls === 'function') {
resultClsName = cls(record, index, indent);
return cls(record, index, indent);
}
return resultClsName;
}

0 comments on commit 251c00e

Please sign in to comment.