Skip to content

Commit 34feb8e

Browse files
authored
Merge pull request #1 from mike623/feature/error-callback
add optional error callback
2 parents c38de2b + 439fc43 commit 34feb8e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ export default function* codePushSaga(options = {}) {
111111
try {
112112
yield call(sync, options.syncOptions, options.codePushStatusDidChange, options.codePushDownloadDidProgress);
113113
} catch (e) {
114-
console.log(e);
114+
if(options.onSyncError && typeof options.onSyncError === 'function'){
115+
options.onSyncError(e)
116+
}else{
117+
console.log(e);
118+
}
115119
}
116120
}
117121
}

0 commit comments

Comments
 (0)