Skip to content

Commit

Permalink
fix(config): add SSR guard for window.navigator (#1756)
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Feb 19, 2024
1 parent 2938ee3 commit 9625ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const standardTruncationOptions = {
* Locale options
*/
const locale: Locale = {
code: navigator?.language || 'en-US', // read from browser's navigator.language
code: typeof navigator !== 'undefined' && navigator?.language || 'en-US', // read from browser's navigator.language
number: (value, language = navigator?.language || 'en-US') => value.toLocaleString(language), // based on code property if specified
date: (
value,
Expand Down

0 comments on commit 9625ae3

Please sign in to comment.