Fixed #4808 - FileUpload: missing fileSizeTypes locale breaks the file select process
parent
cc1a630577
commit
d8fc74f3c5
|
@ -54,7 +54,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]}`;
|
||||
|
|
|
@ -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…
Reference in New Issue