diff options
Diffstat (limited to 'src/platform/detection.ts')
-rw-r--r-- | src/platform/detection.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platform/detection.ts b/src/platform/detection.ts index f4f7be240..150fc1fe3 100644 --- a/src/platform/detection.ts +++ b/src/platform/detection.ts @@ -14,5 +14,7 @@ export const isMobileWeb = global.window.matchMedia(isMobileWebMediaQuery)?.matches export const deviceLocales = dedupArray( - getLocales?.().map?.(locale => locale.languageCode), -) + getLocales?.() + .map?.(locale => locale.languageCode) + .filter(code => typeof code === 'string'), +) as string[] |