Skip to content

Commit bf76b25

Browse files
kyle-ssgkhvn26
authored andcommitted
Add fix from fix/race-condition-on-init-response
1 parent 673fe91 commit bf76b25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flagsmith-core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ const Flagsmith = class {
9090
isFetching: true
9191
})
9292
}
93-
const previousIdentity = `${this.identity}`;
93+
const previousIdentity = `${this.getContext().identity}`;
9494
const handleResponse = (response: IFlagsmithResponse | null) => {
95-
if(!response || previousIdentity !== `${this.identity}`) {
95+
if(!response || previousIdentity !== `${this.getContext().identity}`) {
9696
return // getJSON returned null due to request/response mismatch
9797
}
9898
let { flags: features, traits, identifier }: IFlagsmithResponse = response

0 commit comments

Comments
 (0)