refactor(#59): Verify that 'transactions' is always defined before iteration

This commit is contained in:
Josh Creek
2024-11-04 19:00:23 +00:00
parent 506ceefe26
commit ad30f04078
+2
View File
@@ -106,6 +106,7 @@
<section class="space-y-4"> <section class="space-y-4">
<h2 class="text-xl font-semibold">Billing History</h2> <h2 class="text-xl font-semibold">Billing History</h2>
<ul class="space-y-3"> <ul class="space-y-3">
{#if transactions}
{#each transactions as transaction} {#each transactions as transaction}
<li class="flex justify-between p-4 border border-gray-200 rounded-md"> <li class="flex justify-between p-4 border border-gray-200 rounded-md">
<div> <div>
@@ -124,6 +125,7 @@
{/if} {/if}
</li> </li>
{/each} {/each}
{/if}
</ul> </ul>
</section> </section>
</div> </div>