Update API and example app to match latest Cordova implementation

This commit is contained in:
Will Anderson
2015-09-08 14:41:19 -07:00
parent ae19e24a35
commit 3e0bc07fb3
6 changed files with 154 additions and 101 deletions

View File

@@ -69,7 +69,11 @@ function checkForUpdate() {
return new Promise((resolve, reject) => {
sdk.queryUpdateWithCurrentPackage(queryPackage, (err, update) => {
if (err) return reject(err);
resolve(extend({}, update, packageMixins.remote));
if (update) {
resolve(extend({}, update, packageMixins.remote));
} else {
resolve(update);
}
});
});
});