Skip to content

Commit e40447e

Browse files
DAreRodzDAreRodzgziolo
authored
Interactivity API: Prevent calling proxifyContext over an already-proxified context inside the wp-context directive (#65090)
* Do not store the proxified context inside `currentValue.current`. * Update changelog Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
1 parent bc96d19 commit e40447e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/interactivity/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Bug Fixes
6+
7+
- Prevent calling `proxifyContext` over an already-proxified context inside `wp-context` ([#65090](https://github.com/WordPress/gutenberg/pull/65090)).
8+
59
## 6.7.0 (2024-09-05)
610

711
### Enhancements

packages/interactivity/src/directives.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,10 @@ export default () => {
290290
currentValue.current,
291291
deepClone( value ) as object
292292
);
293-
currentValue.current = proxifyContext(
293+
result[ namespace ] = proxifyContext(
294294
currentValue.current,
295295
inheritedValue[ namespace ]
296296
);
297-
result[ namespace ] = currentValue.current;
298297
}
299298
return result;
300299
}, [ defaultEntry, inheritedValue ] );

0 commit comments

Comments
 (0)