Skip to content

Commit

Permalink
Make match nullable (I should not done this on the web editor)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkellly committed Jun 20, 2024
1 parent 8969dd2 commit e786b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logic/organizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function searchForCompId(query: string): Promise<string | undefined

const json = await response.json() as { result: { id: string, name: string }[] };
const match = json.result.find(c => c.id == query || c.name == query);
return match.id ?? json?.result[0]?.id;
return match?.id ?? json?.result[0]?.id;
}

export async function sortPasswords(
Expand Down

0 comments on commit e786b11

Please sign in to comment.