In Svelte's tutorial on await blocks and promises, they show how to display a certain text when a promise is awaiting/resolved/rejected.
But how can you show an element when something is not loading? I.e. when the promise has either been resolved or rejected (without duplicating the button in both {:then} and {:catch}, of course)
What I'm looking to do is the following:
{#await promise}
{:then number}
<MyElement />
{:catch error}
<MyElement />
{/await}
But without duplicating <MyElement />
.