23 lines
721 B
Diff
23 lines
721 B
Diff
diff --git a/src/lib/statsig/statsig.tsx b/src/lib/statsig/statsig.tsx
|
|
index 1234567..89abcdef 100644
|
|
--- a/src/lib/statsig/statsig.tsx
|
|
+++ b/src/lib/statsig/statsig.tsx
|
|
@@ -266,6 +266,7 @@ export async function tryFetchGates(
|
|
}
|
|
|
|
export function initialize() {
|
|
+ if (!SDK_KEY) return Promise.resolve()
|
|
return Statsig.initialize(SDK_KEY, null, createStatsigOptions([]))
|
|
}
|
|
|
|
@@ -310,6 +311,9 @@ export function Provider({children}: {children: React.ReactNode}) {
|
|
return () => clearInterval(id)
|
|
}, [handleIntervalTick])
|
|
|
|
+ if (!SDK_KEY) {
|
|
+ return <GateCache.Provider value={gateCache}>{children}</GateCache.Provider>
|
|
+ }
|
|
return (
|
|
<GateCache.Provider value={gateCache}>
|
|
<StatsigProvider
|