Skip to content

Commit

Permalink
Don't block init with network request when cache is available
Browse files Browse the repository at this point in the history
  • Loading branch information
frankieyan committed Oct 9, 2024
1 parent 04a9284 commit db9e757
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flagsmith-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ const Flagsmith = class {
}
if (shouldFetchFlags) {
// We want to resolve init since we have cached flags
await this.getFlags();
this.getFlags().catch((e) => {
this.log("Exception fetching cached logs", e);
});
}
} else {
if (!preventFetch) {
Expand Down

0 comments on commit db9e757

Please sign in to comment.