Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 7b27896

Browse files
committed
Fixing typo and spacing
1 parent cc60533 commit 7b27896

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

CodePush.ios.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,34 +99,34 @@ function notifyApplicationReady() {
9999
function sync(options = {}) {
100100
return new Promise((resolve, reject) => {
101101
checkForUpdate()
102-
.then((remotePackage) => {
103-
if (!remotePackage) {
104-
resolve(CodePush.SyncStatus.NO_UPDATE_AVAILABLE);
105-
}
106-
else {
107-
var dialogButtons = [
108-
{
109-
text: options.updateButtonText || "Update",
110-
onPress: () => {
111-
remotePackage.download()
112-
.then((localPackage) => {
113-
resolve(CodePush.SyncStatus.APPLY_SUCCESS);
114-
localPackage.apply(options.rollbackTImeout);
115-
}, reject);
102+
.then((remotePackage) => {
103+
if (!remotePackage) {
104+
resolve(CodePush.SyncStatus.NO_UPDATE_AVAILABLE);
105+
}
106+
else {
107+
var dialogButtons = [
108+
{
109+
text: options.updateButtonText || "Update",
110+
onPress: () => {
111+
remotePackage.download()
112+
.then((localPackage) => {
113+
resolve(CodePush.SyncStatus.APPLY_SUCCESS);
114+
localPackage.apply(options.rollbackTimeout);
115+
}, reject);
116+
}
116117
}
118+
];
119+
120+
if (!remotePackage.isMandatory) {
121+
dialogButtons.push({
122+
text: options.ignoreButtonText || "Ignore",
123+
onPress: () => resolve(CodePush.SyncStatus.UPDATE_IGNORED)
124+
});
117125
}
118-
];
119-
120-
if (!remotePackage.isMandatory) {
121-
dialogButtons.push({
122-
text: options.ignoreButtonText || "Ignore",
123-
onPress: () => resolve(CodePush.SyncStatus.UPDATE_IGNORED)
124-
});
126+
127+
AlertIOS.alert(options.updateTitle || "Update available", remotePackage.description, dialogButtons);
125128
}
126-
127-
AlertIOS.alert(options.updateTitle || "Update available", remotePackage.description, dialogButtons);
128-
}
129-
}, reject);
129+
}, reject);
130130
});
131131
};
132132

0 commit comments

Comments
 (0)