Skip to content

Commit 52d5e86

Browse files
Fix support for custom serializers
1 parent a25c735 commit 52d5e86

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/get-scope.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ function INTERNAL_getClientScope(values?: Values) {
7575
function HACK_injectValues(scope: Scope, values: Values) {
7676
// @ts-expect-error this is a really hacky way to "hydrate" scope
7777
Object.assign(scope.values.sidMap, values);
78+
/**
79+
* We should explicitly set this flag to true, because otherwise the scope will be treated as it was not created from serialized values
80+
* => effector will not apply custom serializers to the scope
81+
*/
82+
(scope as any).fromSerialize = true;
7883
}
7984

8085
function HACK_updateScopeRefs(tscope: Scope, values: Values) {

0 commit comments

Comments
 (0)