This commit is contained in:
Geoffrey Goh 2016-05-24 18:34:30 -07:00
Родитель bf647116d2
Коммит 8545bd73da
2 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -25,9 +25,8 @@ var CodePush = (function () {
cordova.exec(installSuccess, errorCallback, "CodePush", "restartApplication", []);
};
CodePush.prototype.reportStatus = function (status, label, appVersion, deploymentKey, previousLabelOrAppVersion, previousDeploymentKey) {
if ((!label || label === previousLabelOrAppVersion) &&
appVersion === previousLabelOrAppVersion &&
deploymentKey === previousDeploymentKey) {
if (((!label && appVersion === previousLabelOrAppVersion) || label === previousLabelOrAppVersion)
&& deploymentKey === previousDeploymentKey) {
return;
}
var createPackageForReporting = function (label, appVersion) {

Просмотреть файл

@ -63,9 +63,8 @@ class CodePush implements CodePushCordovaPlugin {
* !!! This function is called from the native side, please make changes accordingly. !!!
*/
public reportStatus(status: number, label: string, appVersion: string, deploymentKey: string, previousLabelOrAppVersion?: string, previousDeploymentKey?: string) {
if ((!label || label === previousLabelOrAppVersion) &&
appVersion === previousLabelOrAppVersion &&
deploymentKey === previousDeploymentKey) {
if (((!label && appVersion === previousLabelOrAppVersion) || label === previousLabelOrAppVersion)
&& deploymentKey === previousDeploymentKey) {
// No-op since the new appVersion and label is exactly the same as the previous
// (the app might have been updated via a direct or HockeyApp deployment).
return;