From cd00b5f436412ecc3ac2225d2ee8a9201b172da0 Mon Sep 17 00:00:00 2001 From: Alec Aivazis Date: Sat, 17 Sep 2022 09:29:40 -0700 Subject: [PATCH] Fix error when unsubscribing from cache between fetch and render (#548) * test to reproduce reported error * subscribing to the store should always subscribe to the cache * integration tests pass * changeset --- .changeset/tidy-foxes-melt.md | 5 +++++ .../stores/mutation-update/+page.svelte | 19 ++++++++----------- .../routes/stores/mutation-update/+page.ts | 18 ++++++++++++++++++ src/runtime/stores/query.ts | 5 +++++ 4 files changed, 36 insertions(+), 11 deletions(-) create mode 100644 .changeset/tidy-foxes-melt.md create mode 100644 integration/src/routes/stores/mutation-update/+page.ts diff --git a/.changeset/tidy-foxes-melt.md b/.changeset/tidy-foxes-melt.md new file mode 100644 index 0000000000..5261d330d7 --- /dev/null +++ b/.changeset/tidy-foxes-melt.md @@ -0,0 +1,5 @@ +--- +'houdini': patch +--- + +Fix bug when unsubscribing between load and render diff --git a/integration/src/routes/stores/mutation-update/+page.svelte b/integration/src/routes/stores/mutation-update/+page.svelte index 97e82d3dc8..d71a870f21 100644 --- a/integration/src/routes/stores/mutation-update/+page.svelte +++ b/integration/src/routes/stores/mutation-update/+page.svelte @@ -1,16 +1,13 @@