Skip to content

Commit 5b6fbdb

Browse files
committed
Merge pull request #94 from oney/fix-semver-compare
Fix semver compare when first version
2 parents 30818a1 + c0f8835 commit 5b6fbdb

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
@@ -50,7 +50,7 @@ function checkForUpdate(deploymentKey = null) {
5050
* to send the app version to the server, since we are interested
5151
* in any updates for current app store version, regardless of hash.
5252
*/
53-
if (localPackage && semver.compare(localPackage.appVersion, config.appVersion) === 0) {
53+
if (localPackage && localPackage.appVersion && semver.compare(localPackage.appVersion, config.appVersion) === 0) {
5454
queryPackage = localPackage;
5555
}
5656

0 commit comments

Comments
 (0)