From db9e75792f72b4ad37bb04e1c01c30b73621c934 Mon Sep 17 00:00:00 2001 From: Frankie Yan Date: Wed, 9 Oct 2024 01:01:03 -0700 Subject: [PATCH] Don't block init with network request when cache is available --- flagsmith-core.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flagsmith-core.ts b/flagsmith-core.ts index e628039..94062af 100644 --- a/flagsmith-core.ts +++ b/flagsmith-core.ts @@ -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) {