From 6b69ce4eb9a74d1d384d32c6981a6aaad9e78bc2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 27 Oct 2021 14:24:36 +0100 Subject: [PATCH] Use explicity onDestroy calls rather than an onMount return value to ensure callbacks are actually executed to fix data provider cleanup issues --- .../context/DeviceBindingsProvider.svelte | 11 +++++----- .../src/components/context/Provider.svelte | 6 ++--- .../src/components/preview/DNDHandler.svelte | 22 +++++++++---------- packages/client/src/stores/dataSource.js | 1 - 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/packages/client/src/components/context/DeviceBindingsProvider.svelte b/packages/client/src/components/context/DeviceBindingsProvider.svelte index a6dc64fe74..cdc19c74c2 100644 --- a/packages/client/src/components/context/DeviceBindingsProvider.svelte +++ b/packages/client/src/components/context/DeviceBindingsProvider.svelte @@ -1,6 +1,6 @@ diff --git a/packages/client/src/components/context/Provider.svelte b/packages/client/src/components/context/Provider.svelte index 77efb707d8..19a5c3a462 100644 --- a/packages/client/src/components/context/Provider.svelte +++ b/packages/client/src/components/context/Provider.svelte @@ -1,5 +1,5 @@ diff --git a/packages/client/src/components/preview/DNDHandler.svelte b/packages/client/src/components/preview/DNDHandler.svelte index 8a824f6131..474df4a674 100644 --- a/packages/client/src/components/preview/DNDHandler.svelte +++ b/packages/client/src/components/preview/DNDHandler.svelte @@ -8,7 +8,7 @@ diff --git a/packages/client/src/stores/dataSource.js b/packages/client/src/stores/dataSource.js index 8fb9614a88..c60039aa8a 100644 --- a/packages/client/src/stores/dataSource.js +++ b/packages/client/src/stores/dataSource.js @@ -1,6 +1,5 @@ import { writable, get } from "svelte/store" import { fetchTableDefinition } from "../api" -import { TableNames } from "../constants" export const createDataSourceStore = () => { const store = writable([])