Fix semver compare when first version

This commit is contained in:
Howard Yang
2015-12-07 00:28:34 +08:00
parent 30818a16cb
commit c0f8835477

View File

@@ -50,7 +50,7 @@ function checkForUpdate(deploymentKey = null) {
* to send the app version to the server, since we are interested
* in any updates for current app store version, regardless of hash.
*/
if (localPackage && semver.compare(localPackage.appVersion, config.appVersion) === 0) {
if (localPackage && localPackage.appVersion && semver.compare(localPackage.appVersion, config.appVersion) === 0) {
queryPackage = localPackage;
}