Skip to content

Commit

Permalink
Merge branch 'chore/add-with-traits-when-setting-state' into chore/sy…
Browse files Browse the repository at this point in the history
…nchronous-web-cache

# Conflicts:
#	lib/flagsmith-es/package.json
#	lib/flagsmith/package.json
#	lib/react-native-flagsmith/package.json
  • Loading branch information
kyle-ssg committed Mar 26, 2024
2 parents 39badc7 + 9d25ca4 commit 0b74ed5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flagsmith-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,10 @@ const Flagsmith = class {
this.flags = state.flags || this.flags;
this.identity = state.identity || this.identity;
this.traits = state.traits || this.traits;
this.withTraits = {
...(this.withTraits||{}),
...this.traits,
};
this.evaluationEvent = state.evaluationEvent || this.evaluationEvent;
this.log("setState called", this)
}
Expand Down

0 comments on commit 0b74ed5

Please sign in to comment.