From e0d81d8d84a3aa6b0d4db18c4f526d0a19a92fc1 Mon Sep 17 00:00:00 2001 From: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> Date: Fri, 5 Jan 2024 03:11:53 +0530 Subject: [PATCH] =?UTF-8?q?fix(i18n):=20=F0=9F=A9=B9=20Fixing=20store=20fo?= =?UTF-8?q?r=20localStorageBackend=20plugin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> --- src/i18n.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n.js b/src/i18n.js index e405600ec..fdb5892e3 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -26,7 +26,8 @@ i18n backendOptions: [ { // LocalStorageBackend defaultVersion: version, - expirationTime: (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') ? 1 : 7 * 24 * 60 * 60 * 1000 + expirationTime: (!process.env.NODE_ENV || process.env.NODE_ENV === 'development') ? 1 : 7 * 24 * 60 * 60 * 1000, + store: typeof window !== 'undefined' && 'localStorage' in window ? window.localStorage : null }, { // HttpBackend loadPath: (lngs, namespaces) => {