Skip to content

Commit

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

Signed-off-by: Clovis Durand <[email protected]>
  • Loading branch information
Clovel committed Sep 20, 2021
1 parent 3ddf421 commit e700f02
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 @@ -314,7 +314,7 @@ class CodePush implements CodePushCapacitorPlugin {
*/
const syncCallbackAndUpdateSyncInProgress: Callback<SyncStatus> = (err: Error | null, result: SyncStatus | null): void => {
if (err) {
syncOptions.onSyncError && syncOptions.onSyncError(err);
syncOptions?.onSyncError && syncOptions.onSyncError(err);
CodePush.SyncInProgress = false;
reject(err);
} else {
Expand Down

0 comments on commit e700f02

Please sign in to comment.