mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Fixed #4808 - FileUpload: missing fileSizeTypes locale breaks the file select process
This commit is contained in:
parent
cc1a630577
commit
d8fc74f3c5
2 changed files with 2 additions and 2 deletions
|
@ -328,7 +328,7 @@ export default {
|
|||
formatSize(bytes) {
|
||||
const k = 1024;
|
||||
const dm = 3;
|
||||
const sizes = this.$primevue.config.locale?.fileSizeTypes;
|
||||
const sizes = this.$primevue.config.locale?.fileSizeTypes || ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
|
||||
if (bytes === 0) {
|
||||
return `0 ${sizes[0]}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue