Skip to content

Commit

Permalink
fix: boolean check
Browse files Browse the repository at this point in the history
  • Loading branch information
mananjadhav committed May 29, 2024
1 parent 7151030 commit ab8563b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
const [policy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${policyId}`);
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyId}`);
const isConnectedToAccounting = Object.keys(policy?.connections ?? {}).length > 0;
const isConnectedToQbo = policy?.connections?.quickbooksOnline;
const isConnectedToQbo = Boolean(policy?.connections?.quickbooksOnline);

const fetchCategories = useCallback(() => {
Policy.openPolicyCategoriesPage(policyId);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`);
const {environmentURL} = useEnvironment();
const isConnectedToAccounting = Object.keys(policy?.connections ?? {}).length > 0;
const isConnectedToQbo = policy?.connections?.quickbooksOnline;
const isConnectedToQbo = Boolean(policy?.connections?.quickbooksOnline);
const [policyTagLists, isMultiLevelTags] = useMemo(() => [PolicyUtils.getTagLists(policyTags), PolicyUtils.isMultiLevelTags(policyTags)], [policyTags]);
const canSelectMultiple = !isMultiLevelTags;

Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function WorkspaceTaxesPage({
const isFocused = useIsFocused();

const isConnectedToAccounting = Object.keys(policy?.connections ?? {}).length > 0;
const isConnectedToQbo = policy?.connections?.quickbooksOnline;
const isConnectedToQbo = Boolean(policy?.connections?.quickbooksOnline);

const fetchTaxes = useCallback(() => {
openPolicyTaxesPage(policyID);
Expand Down

0 comments on commit ab8563b

Please sign in to comment.