aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-09-29 22:47:13 -0700
committerFuwn <[email protected]>2023-09-29 22:47:37 -0700
commit20ba2dce8bbb194a5a1cb901f7119746e527ae2a (patch)
treecf4907bcc64d517917f88552fda8deb559d8b662
parentfix(manga): typed comparison (diff)
downloaddue.moe-20ba2dce8bbb194a5a1cb901f7119746e527ae2a.tar.xz
due.moe-20ba2dce8bbb194a5a1cb901f7119746e527ae2a.zip
fix(list): restrict to number
-rw-r--r--src/lib/List/ListTitle.svelte4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/List/ListTitle.svelte b/src/lib/List/ListTitle.svelte
index 2aa580d3..0cfc1273 100644
--- a/src/lib/List/ListTitle.svelte
+++ b/src/lib/List/ListTitle.svelte
@@ -1,5 +1,5 @@
<script lang="ts">
- export let time: number | string = '...';
+ export let time: number | undefined = undefined;
export let count: number | string = '...';
export let anime = false;
export let custom = '';
@@ -7,6 +7,6 @@
<summary>
{custom.length !== 0 ? custom : anime ? 'Anime' : 'Manga & Light Novels'} [{count}]
- <small style="opacity: 50%">{time}s</small>
+ <small style="opacity: 50%">{time ? time.toFixed(3) : '...'}s</small>
<slot />
</summary>