Skip to content
Snippets Groups Projects
Commit 7ea19d50 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Don't fail when there is a reference without a formula at a given instant.

parent acbbf807
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,11 @@
{#each buildInstantFormulaAndReferencesArray(variable) as { formula, instant, references }}
<div class="mt-10">
<h2 class="mr-1 mb-1 font-serif font-bold text-xl pt-7 pb-1">
{#if instant === "0001-01-01"}
{#if formula === undefined}
{#if instant !== "0001-01-01"}
Le <i>{instant}</i>&nbsp;:
{/if}
{:else if instant === "0001-01-01"}
{#if Object.keys(variable.formulas).length > 1}
Formule <i>initiale</i> de calcul OpenFisca&nbsp;:
{:else}
......@@ -185,11 +189,13 @@
{/if}
</h2>
{#if formula !== undefined}
{#if formula === null}
<i>Aucune formule à partir de cette date</i>
{:else}
<FormulaView {formula} bind:situation {year} />
{/if}
{/if}
{#if references.length > 0}
<section>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment