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