From 2bacce618cd9b9c2b274e1b4ca207be8403b6efd Mon Sep 17 00:00:00 2001 From: Martijn Walraven Date: Sun, 18 Oct 2015 14:12:53 -0700 Subject: [PATCH] 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. --- tools/cordova/builder.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/cordova/builder.js b/tools/cordova/builder.js index 92cdd189e6..16874f2c35 100644 --- a/tools/cordova/builder.js +++ b/tools/cordova/builder.js @@ -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'];