Skip to content

Commit 0ef8759

Browse files
authored
fix: plurality of item counts for objects with 1 item (#40)
1 parent 31da866 commit 0ef8759

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/section/CountInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const CountInfoComp = <K extends TagType, T extends object>(
3333

3434
const len = Object.keys(value).length;
3535
if (!reset.children) {
36-
reset.children = `${len} items`;
36+
reset.children = `${len} item${len === 1 ? '' : 's'}`;
3737
}
3838

3939
const elmProps = { ...reset, ...other };

0 commit comments

Comments
 (0)