Skip to content

Commit

Permalink
fix: Use correctly optional chaining to get me
Browse files Browse the repository at this point in the history
me[0] should exist here because every one has me. But after we should use it until the end.
  • Loading branch information
zatteo committed Nov 15, 2024
1 parent 6b9d10f commit 7705380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/cozy/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const shouldDisplayContact = async (client: CozyClient, contact: IOCozyCo
const me = await fetchMyself(client);

const contactRelatedToMe = // @ts-expect-error related added manually with an hydration
me?.[0]?.relationships?.related?.data.find(
me[0].relationships?.related?.data?.find(
// @ts-expect-error related added manually with an hydration
(relatedContact) => relatedContact._id === contact._id,
);
Expand Down

0 comments on commit 7705380

Please sign in to comment.