From d0337f218df4fc61b7e2e62c1246d38ec1bdb3a9 Mon Sep 17 00:00:00 2001 From: David Arenas Date: Tue, 27 Aug 2024 20:05:55 +0200 Subject: [PATCH] Interactivity API: Fix computeds without scope in Firefox (#64825) * Replace NO_SCOPE symbol with an object * Update changelog Co-authored-by: DAreRodz Co-authored-by: luisherranz Co-authored-by: Marc-pi --- packages/interactivity/CHANGELOG.md | 4 ++++ packages/interactivity/src/proxies/signals.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/interactivity/CHANGELOG.md b/packages/interactivity/CHANGELOG.md index abc79853d222bf..b9ca382e835d5e 100644 --- a/packages/interactivity/CHANGELOG.md +++ b/packages/interactivity/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Bug Fixes + +- Fix computeds without scope in Firefox ([#64825](https://github.com/WordPress/gutenberg/pull/64825)). + ## 6.6.0 (2024-08-21) ### Bug Fixes diff --git a/packages/interactivity/src/proxies/signals.ts b/packages/interactivity/src/proxies/signals.ts index 6a3f41c149e134..29bd58aaa4fced 100644 --- a/packages/interactivity/src/proxies/signals.ts +++ b/packages/interactivity/src/proxies/signals.ts @@ -20,7 +20,7 @@ import { withScope } from '../utils'; /** * Identifier for property computeds not associated to any scope. */ -const NO_SCOPE = Symbol(); +const NO_SCOPE = {}; /** * Structure that manages reactivity for a property in a state object. It uses