change var name

This commit is contained in:
Geoffrey Goh
2016-02-29 15:08:19 -08:00
parent 9c416cddbc
commit c0d99ab936
3 changed files with 5 additions and 8 deletions

View File

@@ -70,12 +70,9 @@ async function checkForUpdate(deploymentKey = null) {
* because we want to avoid having to install diff updates against the binary's
* version, which we can't do yet on Android.
*/
if (
!update ||
update.updateAppVersion ||
localPackage && (update.packageHash === localPackage.packageHash) ||
(!localPackage || localPackage.isRunningBinaryVersion) && config.packageHash === update.packageHash
) {
if (!update || update.updateAppVersion ||
localPackage && (update.packageHash === localPackage.packageHash) ||
(!localPackage || localPackage._isDebugOnly) && config.packageHash === update.packageHash) {
if (update && update.updateAppVersion) {
log("An update is available but it is targeting a newer binary version than you are currently running.");
}

View File

@@ -424,7 +424,7 @@ public class CodePush {
}
if (isRunningBinaryVersion) {
currentPackage.putBoolean("isRunningBinaryVersion", isRunningBinaryVersion);
currentPackage.putBoolean("_isDebugOnly", isRunningBinaryVersion);
}
Boolean isPendingUpdate = false;

View File

@@ -484,7 +484,7 @@ RCT_EXPORT_METHOD(getCurrentPackage:(RCTPromiseResolveBlock)resolve
// This only matters in Debug builds. Since we do not clear "outdated" updates,
// we need to indicate to the JS side that somehow we have a current update on
// disk that is not actually running.
[package setObject:@(isRunningBinaryVersion) forKey:@"isRunningBinaryVersion"];
[package setObject:@(isRunningBinaryVersion) forKey:@"_isDebugOnly"];
}
// Add the "isPending" virtual property to the package at this point, so that