diff --git a/package.json b/package.json index 5034aa77767b..cbeaa72ffc7e 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand", "perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure", "typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc", - "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=316 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=315 --cache --cache-location=node_modules/.cache/eslint", "lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh", "lint-watch": "npx eslint-watch --watch --changed", "shellcheck": "./scripts/shellCheck.sh", diff --git a/src/libs/actions/Locale.ts b/src/libs/actions/Locale.ts index 19283e61f3a6..b33f0ac95a10 100644 --- a/src/libs/actions/Locale.ts +++ b/src/libs/actions/Locale.ts @@ -8,7 +8,8 @@ import ONYXKEYS from '@src/ONYXKEYS'; * This function is used to ensure that the locale is loaded before we start to render UI. Once we load initial locale we can remove listener. */ function init() { - const connection = Onyx.connect({ + // Use connectWithoutView since this is a one-time initialization that disconnects immediately. + const connection = Onyx.connectWithoutView({ key: ONYXKEYS.NVP_PREFERRED_LOCALE, initWithStoredValues: true, callback: (locale) => {