diff --git a/src/App.svelte b/src/App.svelte index 2a98f8e380cbc6a45d985332df2a372d72c1e685..173973e0b560388feda729dc4892a2c7c0afdf96 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -14,7 +14,7 @@ import FormulaS from "./FormulaS.svelte"; for (let i = 0; i <= NUMBER_OF_WORKPACKAGES; i++) { workPackages.push({a: null, b:null, c: null}); } - $: dataJson = JSON.stringify(workPackages, null, 2) + $: dataJson = JSON.stringify(workPackages.filter(({a,b,c}) => a !== null || b !== null || c !== null), null, 2) let jsonPasteArea = ""; @@ -60,7 +60,7 @@ import FormulaS from "./FormulaS.svelte"; <summary> Debug: Show Input as JSON </summary> - <pre> + <pre style="border: 1px solid;"> {dataJson} </pre> </details><details> @@ -81,7 +81,7 @@ import FormulaS from "./FormulaS.svelte"; if (typeof elem.c !== 'number' && elem.c !== null) throw TypeError("An 'c' attribute was neither number not null"); } - workPackages = decoded; + workPackages = [...decoded, {a: null, b: null, c: null}]; jsonPasteArea = ""; } catch (error) { alert(error.toString())