diff --git a/package.json b/package.json index 15ce4ae41b2d0..10b7b5972a72e 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=216 --cache --cache-location=node_modules/.cache/eslint", + "lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=215 --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/App.ts b/src/libs/actions/App.ts index a8fc974c3e79f..cb981baa94ea2 100644 --- a/src/libs/actions/App.ts +++ b/src/libs/actions/App.ts @@ -58,8 +58,11 @@ Onyx.connect({ }, }); +// preservedShouldUseStagingServer is used in the "clearOnyxAndResetApp" functions and is not directly associated with the View, +// so retrieving it using Onyx.connectWithoutView is correct. +// If this variable is ever needed for use in React components, it should be retrieved using useOnyx. let preservedShouldUseStagingServer: boolean | undefined; -Onyx.connect({ +Onyx.connectWithoutView({ key: ONYXKEYS.ACCOUNT, callback: (value) => { preservedShouldUseStagingServer = value?.shouldUseStagingServer;