Skip to content

Commit 91d6d6b

Browse files
authored
Update Picker.js
1 parent cdb3750 commit 91d6d6b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/Picker.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,15 @@ function Picker({
588588
const item = getSelectedItem();
589589

590590
if (multiple)
591-
if (item.length > 0)
592-
return _multipleText.replace('{count}', item.length);
593-
else
591+
if (item.length > 0) {
592+
let mtext = _multipleText;
593+
594+
if (typeof mtext !== 'string') {
595+
mtext = mtext[item.length] ?? mtext.n;
596+
}
597+
598+
return mtext.replace('{count}', item.length);
599+
} else
594600
return fallback;
595601

596602
try {

0 commit comments

Comments
 (0)