From 7ee9f7fabb3b8c4c524b159ec34d6c41643697ea Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Wed, 18 Dec 2024 11:03:03 +0100 Subject: [PATCH] First structure flush should update all roots (fixes #296) --- .changeset/big-pugs-bathe.md | 5 +++++ packages/debugger/src/structure/index.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/big-pugs-bathe.md diff --git a/.changeset/big-pugs-bathe.md b/.changeset/big-pugs-bathe.md new file mode 100644 index 00000000..969b4832 --- /dev/null +++ b/.changeset/big-pugs-bathe.md @@ -0,0 +1,5 @@ +--- +"@solid-devtools/debugger": patch +--- + +First structure flush should update all roots (instead of sending partial update) - Fixes #296 diff --git a/packages/debugger/src/structure/index.ts b/packages/debugger/src/structure/index.ts index 8ce280ff..0aad5a6b 100644 --- a/packages/debugger/src/structure/index.ts +++ b/packages/debugger/src/structure/index.ts @@ -57,7 +57,7 @@ export function createStructure(props: { /** root ids correcponding to owners in the update queue */ const ownerRoots = new Map() const removedRoots = new Set() - let shouldUpdateAllRoots = false + let shouldUpdateAllRoots = true const onComputationUpdate: ComputationUpdateHandler = ( rootId, @@ -74,6 +74,7 @@ export function createStructure(props: { } function forceFlushRootUpdateQueue(): void { + if (props.enabled()) { const updated: StructureUpdates['updated'] = {}