Skip to content

Commit f15d108

Browse files
authored
Update Object datatype for correct pluralization of Items
1 parent 20ef810 commit f15d108

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/DataTypes/Object.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function inspectMetadata (value: object) {
2626
if (Object.prototype.hasOwnProperty.call(value, Symbol.toStringTag)) {
2727
name = (value as any)[Symbol.toStringTag]
2828
}
29-
return `${length} Items${name ? ` (${name})` : ''}`
29+
const itemsPluralized = length === 1 ? "Item" : "Items";
30+
return `${length} ${itemsPluralized}${name ? ` (${name})` : ''}`
3031
}
3132

3233
const PreObjectType: FC<DataItemProps<object>> = (props) => {

0 commit comments

Comments
 (0)