We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe5d1a3 commit a9d5c54Copy full SHA for a9d5c54
1 file changed
src/hooks/useSubscriptionPlan.ts
@@ -6,8 +6,8 @@ import {isEmptyObject} from '@src/types/utils/EmptyObject';
6
import useOnyx from './useOnyx';
7
8
function useSubscriptionPlan() {
9
- const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY);
10
- const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA);
+ const [policies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false});
+ const [userMetadata] = useOnyx(ONYXKEYS.USER_METADATA, {canBeMissing: true});
11
12
// Filter workspaces in which user is the owner and the type is either corporate (control) or team (collect)
13
const ownerPolicies = useMemo(() => getOwnedPaidPolicies(policies, userMetadata?.accountID ?? -1), [policies, userMetadata?.accountID]);
0 commit comments