From e441bc600890f40f8cf4cf1892616320fbf3fbe6 Mon Sep 17 00:00:00 2001 From: gijoe0295 Date: Sat, 16 Nov 2024 00:03:01 +0700 Subject: [PATCH] do not reuseConnection in withPolicy to avoid infinite loading --- src/pages/workspace/withPolicy.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/withPolicy.tsx b/src/pages/workspace/withPolicy.tsx index 16f05fa3e324..5060761359f6 100644 --- a/src/pages/workspace/withPolicy.tsx +++ b/src/pages/workspace/withPolicy.tsx @@ -78,7 +78,7 @@ export default function ( function WithPolicy(props: Omit, ref: ForwardedRef) { const policyID = getPolicyIDFromRoute(props.route as PolicyRoute); - const [policy, policyResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`); + const [policy, policyResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyID}`, {reuseConnection: false}); const [policyDraft, policyDraftResults] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_DRAFTS}${policyID}`); const isLoadingPolicy = isLoadingOnyxValue(policyResults, policyDraftResults);