mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-19 19:39:54 +08:00
Fix semver compare when first version
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user