fix: error on first load

This commit is contained in:
Arman committed 2022-06-21 10:25:50 +02:00
1 parent 3fdedc7864
commit d8cae40170
2 files changed
+5 -5

No files matched your search

@@ -103,8 +103,8 @@
</div>
</Empty>
<div class="u-flex common-section u-main-space-between">
<p class="text">Total results: {$files.response.total}</p>
<Pagination {limit} bind:offset sum={$files.response.total} />
<p class="text">Total results: {$files.response?.total}</p>
<Pagination {limit} bind:offset sum={$files.response?.total} />
</div>
{:else}
<Empty dashed centered>
@@ -50,7 +50,7 @@
</Button>
</div>
{#if $bucketList.response.total}
{#if $bucketList.response?.total}
<Tiles>
{#each $bucketList.response.buckets as bucket}
<a class="card" href={`${base}/console/${project}/storage/bucket/${bucket.$id}`}>
@@ -101,8 +101,8 @@
</div>
</Empty>
<div class="u-flex common-section u-main-space-between">
<p class="text">Total results: {$bucketList.response.total}</p>
<Pagination {limit} bind:offset sum={$bucketList.response.total} />
<p class="text">Total results: {$bucketList.response?.total}</p>
<Pagination {limit} bind:offset sum={$bucketList.response?.total} />
</div>
{:else}
<Empty dashed centered>