From 3bc249db905c6723de1fc4c9b9b90a43ba5ce0f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Henriques?= Date: Wed, 4 Dec 2024 20:14:29 +0000 Subject: [PATCH] Remove reuseConnection from withPolicy --- src/pages/workspace/withPolicy.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/workspace/withPolicy.tsx b/src/pages/workspace/withPolicy.tsx index 51ee85fd0bee..99b3cf2e6baf 100644 --- a/src/pages/workspace/withPolicy.tsx +++ b/src/pages/workspace/withPolicy.tsx @@ -79,8 +79,7 @@ export default function ( function WithPolicy(props: Omit, ref: ForwardedRef) { const policyID = getPolicyIDFromRoute(props.route as PolicyRoute); - // Disable reuseConnection to temporarily fix the infinite loading status after Onyx.set(null). Reference: https://github.com/Expensify/App/issues/52640 - const [policy, policyResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {reuseConnection: false}); + const [policy, policyResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`); const [policyDraft, policyDraftResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_DRAFTS}${policyID}`); const isLoadingPolicy = isLoadingOnyxValue(policyResults, policyDraftResults);