diff --git a/frontend/src/components/FileSize.vue b/frontend/src/components/FileSize.vue index fbc0bfe..00b4658 100644 --- a/frontend/src/components/FileSize.vue +++ b/frontend/src/components/FileSize.vue @@ -6,27 +6,38 @@ import type { Document } from '@/repositories/Document' import { computed } from 'vue' -const sizeClass = computed(() => props.doc.sizedisp.split('\u202F').slice(-1)[0]) +const sizeClass = computed(() => { + const unit = props.doc.sizedisp.split('\u202F').slice(-1)[0] + return +unit ? "bytes" : unit +}) const props = defineProps<{ doc: Document }>() -