Skip to content

Commit

Permalink
Fixed #4808 - FileUpload: missing fileSizeTypes locale breaks the fil…
Browse files Browse the repository at this point in the history
…e select process
  • Loading branch information
tugcekucukoglu committed Nov 13, 2023
1 parent cc1a630 commit d8fc74f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/fileupload/FileContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`;
Expand Down
2 changes: 1 addition & 1 deletion components/lib/fileupload/FileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`;
Expand Down

0 comments on commit d8fc74f

Please sign in to comment.