Skip to content

Commit

Permalink
fix: remove localStorage undefined warning message (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyiuhc authored Jan 11, 2024
1 parent 3d6f5ba commit 19fdf19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/experiment-browser/src/experimentClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand All @@ -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);
}
Expand Down

0 comments on commit 19fdf19

Please sign in to comment.