Skip to content

Commit

Permalink
Check if currentPackage isn’t undefined before accessing to the isPen…
Browse files Browse the repository at this point in the history
…ding property (#779)
  • Loading branch information
sergey-akhalkov committed Apr 4, 2017
1 parent 31fdd04 commit e558fb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
}

const currentPackage = await CodePush.getCurrentPackage();
if (currentPackage.isPending) {
if (currentPackage && currentPackage.isPending) {
syncStatusChangeCallback(CodePush.SyncStatus.UPDATE_INSTALLED);
return CodePush.SyncStatus.UPDATE_INSTALLED;
} else {
Expand Down

0 comments on commit e558fb2

Please sign in to comment.