From c78e8e05a6ef0143bf2c5100884a12122de69599 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 3 Jul 2025 14:44:22 -0400 Subject: [PATCH] simplify. no idea what the async_mode_flag stuff is about, but it appears unnecessary --- packages/svelte/src/internal/client/runtime.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 82407ad8bb..7985d2312f 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -802,12 +802,10 @@ export function get(signal) { // we don't add the dependency, because that would create a memory leak var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0; - if ( - !destroyed && - ((async_mode_flag && (active_reaction.f & DERIVED) === 0) || - source_ownership?.reaction !== active_reaction || - !source_ownership?.sources.includes(signal)) - ) { + var is_owned_by_reaction = + source_ownership?.reaction === active_reaction && source_ownership.sources.includes(signal); + + if (!destroyed && !is_owned_by_reaction) { var deps = active_reaction.deps; if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) {