Fix client hash calculation during initial build for Cordova

Including an empty PUBLIC_SETTINGS object when there are no public
settings fixes a discrepancy between the way we calculated the client
hash for Cordova in CordovaBuilder and in webapp_server.js. This
discrepancy meant a Cordova app would always download a new version the
first time it started up, because the bundled version hash and the
server version hash would be different.
This commit is contained in:
Martijn Walraven
2015-10-18 14:12:53 -07:00
parent b77a95e500
commit 2bacce618c

View File

@@ -383,9 +383,7 @@ export class CordovaBuilder {
release.current.isCheckout() ? "none" : release.current.name;
let configDummy = {};
if (publicSettings) {
configDummy.PUBLIC_SETTINGS = publicSettings;
}
configDummy.PUBLIC_SETTINGS = publicSettings || {};
const { WebAppHashing } =
isopackets.load('cordova-support')['webapp-hashing'];