Skip to content

Commit

Permalink
Merge pull request #3 from effector/support-22-8-0
Browse files Browse the repository at this point in the history
Support effector v22.8.0
  • Loading branch information
AlexandrHoroshih authored Apr 7, 2023
2 parents 60c8f8e + 9c34f12 commit 1fa5c0d
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/get-scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,25 @@ function HACK_injectValues(scope: Scope, values: Values) {
const oldValues = serialize(scope);

// @ts-expect-error this is a really hacky way to "hydrate" scope
scope.sidValuesMap = {
...oldValues,
...values,
};
if (scope.values) {
/**
* [email protected] and higher
*/
// @ts-expect-error
scope.values.sidMap = {
...oldValues,
...values,
}
} else {
/**
* effector before 22.8.0
*/
// @ts-expect-error this is a really hacky way to "hydrate" scope
scope.sidValuesMap = {
...oldValues,
...values,
};
}
}

function HACK_resetScopeRefs(scope: Scope) {
Expand Down

0 comments on commit 1fa5c0d

Please sign in to comment.