From 19fdf197c2959b70ce7c100b25f225088f693ac0 Mon Sep 17 00:00:00 2001 From: Tim Yiu <137842098+tyiuhc@users.noreply.github.com> Date: Thu, 11 Jan 2024 14:16:41 -0800 Subject: [PATCH] fix: remove localStorage undefined warning message (#95) --- packages/experiment-browser/src/experimentClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/experiment-browser/src/experimentClient.ts b/packages/experiment-browser/src/experimentClient.ts index 9fe45390..42f3ff9c 100644 --- a/packages/experiment-browser/src/experimentClient.ts +++ b/packages/experiment-browser/src/experimentClient.ts @@ -153,7 +153,7 @@ export class ExperimentClient implements Client { this.flags.load(); this.variants.load(); } catch (e) { - console.warn('Failed to load flags and variants from localStorage', e); + // catch localStorage undefined error } } @@ -329,7 +329,7 @@ export class ExperimentClient implements Client { try { void this.variants.store(); } catch (e) { - console.warn('Failed to store variants in localStorage', e); + // catch localStorage undefined error } } @@ -675,7 +675,7 @@ export class ExperimentClient implements Client { try { this.flags.store(); } catch (e) { - console.warn('Failed to store flags in localStorage', e); + // catch localStorage undefined error } } @@ -698,7 +698,7 @@ export class ExperimentClient implements Client { try { this.variants.store(); } catch (e) { - console.warn('Failed to store variants in localStorage', e); + // catch localStorage undefined error } this.debug('[Experiment] Stored variants: ', variants); }