Skip to content

Commit 848aedf

Browse files
committed
fix: do a proper null check
1 parent 44e5ed4 commit 848aedf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/components/Package/TableRow.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ const compactNumberFormatter = useCompactNumberFormatter()
8484
v-if="isColumnVisible('downloads')"
8585
class="py-2 px-3 font-mono text-xs text-fg-muted text-end tabular-nums"
8686
>
87-
{{ result.downloads?.weekly ? compactNumberFormatter.format(result.downloads.weekly) : '-' }}
87+
{{
88+
result.downloads?.weekly !== undefined
89+
? compactNumberFormatter.format(result.downloads.weekly)
90+
: '-'
91+
}}
8892
</td>
8993

9094
<!-- Updated -->

0 commit comments

Comments
 (0)