diff --git a/svelte-ui/src/components/Composition.svelte b/svelte-ui/src/components/Composition.svelte index 97a19d1..da360ea 100644 --- a/svelte-ui/src/components/Composition.svelte +++ b/svelte-ui/src/components/Composition.svelte @@ -16,6 +16,7 @@ export let ignoreZeroWeight: boolean = false; let list: CompositionItem[] = []; + let allOnes: boolean = false; function calculateAmount(log: LogResult, unweighted: boolean) { let amount = 0; @@ -83,12 +84,16 @@ list = Object.keys(map).sort((a, b) => map[b].amount - map[a].amount).map(k => map[k]).filter(e => e.amount > 0); } + + $: allOnes = list.find(l => l.amount !== 1) == null;