From 6b42ef32bd8d591f7bd733da6af16072617c9f9b Mon Sep 17 00:00:00 2001 From: Kyriakos Lesgidis Date: Mon, 11 Dec 2023 17:35:49 +0200 Subject: [PATCH] Fix issue with mutated config in gb instance --- src/initializers/growthbook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initializers/growthbook.ts b/src/initializers/growthbook.ts index a2a703c7..8d246b54 100644 --- a/src/initializers/growthbook.ts +++ b/src/initializers/growthbook.ts @@ -9,5 +9,5 @@ import type * as GrowthbookType from 'growthbook'; export const createGrowthbook = = Record>(config: GrowthbookType.Context) => { if (!config?.clientKey) return; const {GrowthBook} = requireInjected('growthbook'); - return new GrowthBook(config) as GrowthbookType.GrowthBook; + return new GrowthBook({...config}) as GrowthbookType.GrowthBook; };