From 947b8d8262f22f528d803f6adf1398847b9b35e4 Mon Sep 17 00:00:00 2001 From: David Arenas Date: Wed, 24 Jul 2024 11:20:32 +0200 Subject: [PATCH] Remove remaining deepSignal references --- packages/interactivity/src/directives.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/interactivity/src/directives.tsx b/packages/interactivity/src/directives.tsx index 8cb4e60d0ddc5..3174bead2ab21 100644 --- a/packages/interactivity/src/directives.tsx +++ b/packages/interactivity/src/directives.tsx @@ -131,20 +131,20 @@ const proxifyContext = ( current: object, inherited: object = {} ): object => { }; /** - * Recursively update values within a deepSignal object. + * Recursively update values within a context object. * - * @param proxy A deepSignal instance. - * @param source Object with properties to update in `proxy`. + * @param target A context instance. + * @param source Object with properties to update in `target`. */ -const updateSignals = ( proxy: any, source: any ) => { +const updateContext = ( target: any, source: any ) => { for ( const k in source ) { if ( - isPlainObject( peek( proxy, k ) ) && + isPlainObject( peek( target, k ) ) && isPlainObject( source[ k ] ) ) { - updateSignals( peek( proxy, k ) as object, source[ k ] ); + updateContext( peek( target, k ) as object, source[ k ] ); } else { - proxy[ k ] = source[ k ]; + target[ k ] = source[ k ]; } } }; @@ -287,7 +287,7 @@ export default () => { `The value of data-wp-context in "${ namespace }" store must be a valid stringified JSON object.` ); } - updateSignals( + updateContext( currentValue.current[ namespace ], deepClone( value ) as object );