Skip to content

Commit

Permalink
Merge pull request #53597 from callstack-internal/bugfix/52640
Browse files Browse the repository at this point in the history
Remove reuseConnection from withPolicy
  • Loading branch information
neil-marcellini authored Dec 11, 2024
2 parents 3f9a1ce + 7966c44 commit 9b64e36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/workspace/withPolicy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ export default function <TProps extends WithPolicyProps, TRef>(
function WithPolicy(props: Omit<TProps, keyof WithPolicyOnyxProps>, ref: ForwardedRef<TRef>) {
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);

Expand Down

0 comments on commit 9b64e36

Please sign in to comment.