Skip to content

Commit 3606808

Browse files
committed
fix: move modification of queryString to try block
1 parent fbf1a02 commit 3606808

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,11 @@ async function reloadTranslations(list, i18nInstance) {
8181
try {
8282
backendOptions = i18nInstance.services.backendConnector.backend.options;
8383
backendOptions.queryStringParams = backendOptions.queryStringParams || {};
84+
backendOptions.queryStringParams._ = new Date().getTime(); // cache killer
8485
} catch (e) {
8586
logOnce('Client i18next-http-backend not found, hmr may not work', 'warn');
8687
}
8788

88-
backendOptions.queryStringParams._ = new Date().getTime(); // cache killer
89-
9089
const langs = uniqueList(list.map((item) => item.lang));
9190
const namespaces = uniqueList(list.map((item) => item.ns));
9291

0 commit comments

Comments
 (0)