Skip to content

Commit e558fb2

Browse files
Check if currentPackage isn’t undefined before accessing to the isPending property (#779)
1 parent 31fdd04 commit e558fb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodePush.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ async function syncInternal(options = {}, syncStatusChangeCallback, downloadProg
343343
}
344344

345345
const currentPackage = await CodePush.getCurrentPackage();
346-
if (currentPackage.isPending) {
346+
if (currentPackage && currentPackage.isPending) {
347347
syncStatusChangeCallback(CodePush.SyncStatus.UPDATE_INSTALLED);
348348
return CodePush.SyncStatus.UPDATE_INSTALLED;
349349
} else {

0 commit comments

Comments
 (0)