okrad / svelte-progressbar

A multiseries, SVG progressbar component made with Svelte
https://okrad.github.io/svelte-progressbar/
MIT License
129 stars 18 forks source link

Unhandled exception on destruct #18

Closed Brandon2255p closed 1 year ago

Brandon2255p commented 3 years ago

Hi there I am unable to "destruct" this component.. A simple example is if I use a show flag

<div on:click={() => (show = false)}>
  {#if show}
    <ProgressBar {series} width="100%" textSize={0} />
  {/if}
  <p>Prep {prep}% | Grow {grow}% | Flower {flower}% | Finalise {finalise}%</p>
</div>

When you click then it gives this stacktrace into the progressbar:

Uncaught (in promise) TypeError: Cannot read property 'c' of undefined
    at D (index.mjs:1)
    at Object.o (index.mjs:1)
    at transition_out (index.mjs:817)
Brandon2255p commented 3 years ago

https://github.com/sveltejs/svelte/issues/3165

okrad commented 3 years ago

Thank you @Brandon2255p, I'm looking into it, I'll let you know asap!