From 36e14cd525c9fc1b931b37ec66065e762497360b Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Sun, 21 Mar 2021 22:06:25 +0100 Subject: [PATCH] Add WithGraphData --- ts/graphs/WithGraphData.svelte | 31 +++++++++++++++++++++++++++++++ ts/graphs/asyncReactive.ts | 1 + 2 files changed, 32 insertions(+) create mode 100644 ts/graphs/WithGraphData.svelte diff --git a/ts/graphs/WithGraphData.svelte b/ts/graphs/WithGraphData.svelte new file mode 100644 index 000000000..7c3af297a --- /dev/null +++ b/ts/graphs/WithGraphData.svelte @@ -0,0 +1,31 @@ + + + + diff --git a/ts/graphs/asyncReactive.ts b/ts/graphs/asyncReactive.ts index 5016c7227..d53c14895 100644 --- a/ts/graphs/asyncReactive.ts +++ b/ts/graphs/asyncReactive.ts @@ -27,6 +27,7 @@ function useAsyncReactive( promise, ($promise, set: (error: E | null) => void) => { $promise.catch((error: E) => set(error)); + return () => set(null); }, null );