Skip to content

Commit

Permalink
Fix the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DAreRodz committed Oct 16, 2024
1 parent 0d89041 commit 5dcaded
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/interactivity/src/proxies/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ const deepMergeRecursive = (
if ( isNew || ( override && ! isPlainObject( target[ key ] ) ) ) {
target[ key ] = {};
if ( propSignal ) {
propSignal.setValue( target[ key ] );
const ns = getNamespaceFromProxy( proxy );
propSignal.setValue(
proxifyState( ns, target[ key ] as Object )
);
}
}
if ( isPlainObject( target[ key ] ) ) {
Expand All @@ -344,7 +347,11 @@ const deepMergeRecursive = (
} else if ( override || isNew ) {
Object.defineProperty( target, key, desc );
if ( propSignal ) {
propSignal.setValue( desc.value );
const { value } = desc;
const ns = getNamespaceFromProxy( proxy );
propSignal.setValue(
shouldProxy( value ) ? proxifyState( ns, value ) : value
);
}
}
}
Expand Down

0 comments on commit 5dcaded

Please sign in to comment.