Skip to content

Commit

Permalink
[Fixes mpaghq#39] sync : Check if syncOptions exists before checking …
Browse files Browse the repository at this point in the history
…syncOptions?.onSyncStatusChanged

Signed-off-by: Clovis Durand <[email protected]>
  • Loading branch information
Clovel committed Sep 20, 2021
1 parent 6b83ede commit bfd6145
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codePush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class CodePush implements CodePushCapacitorPlugin {
reject(err);
} else {
/* Call the user's callback */
syncOptions.onSyncStatusChanged && syncOptions.onSyncStatusChanged(result);
syncOptions?.onSyncStatusChanged && syncOptions.onSyncStatusChanged(result);

/* Check if the sync operation is over */
switch (result) {
Expand Down

0 comments on commit bfd6145

Please sign in to comment.