Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More idomatic existence check
Co-authored-by: AbdulFattaah Popoola <abdulapopoola@github.com>
  • Loading branch information
2 people authored and GitHub committed Nov 1, 2023
1 parent 6a9ec47 commit 7360429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api-client.ts
Expand Up @@ -56,7 +56,7 @@ export class ApiClient {
}: ${JSON.stringify(res.result)}`
)
}
if (res.result == null) {
if (!res.result) {
throw new JobDetailsFetchingError(
`fetching job details: missing response`
)
Expand Down Expand Up @@ -94,7 +94,7 @@ export class ApiClient {
}: ${JSON.stringify(res.result)}`
)
}
if (res.result == null) {
if (!res.result) {
throw new CredentialFetchingError(
`fetching credentials: missing response`
)
Expand Down

0 comments on commit 7360429

Please sign in to comment.