Skip to content

Commit

Permalink
[nan-338] optional chaining (#1633)
Browse files Browse the repository at this point in the history
  • Loading branch information
khaliqgant authored Feb 7, 2024
1 parent 6fa2f2f commit 395f366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/lib/clients/sync.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ class SyncClient {

// Errors received from temporal are raw objects not classes
const error =
!(rawError instanceof NangoError) && rawError.type && rawError.status
? new NangoError(rawError.type, rawError.payload, rawError.status)
!(rawError instanceof NangoError) && rawError?.type && rawError.status
? new NangoError(rawError?.type, rawError?.payload, rawError.status)
: rawError;

if (writeLogs && (success === false || error)) {
Expand Down

0 comments on commit 395f366

Please sign in to comment.