Don't pass false query value for enableCI

`?enableCI=false` in the main window URL is treated as truthy value so
don't pass it at all.
This commit is contained in:
Fedor Indutny 2021-03-29 15:18:58 -07:00 committed by GitHub
parent 84f4e6ac64
commit 05ea4a4ff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -224,7 +224,7 @@ function prepareURL(pathSegments, moreKeys) {
cdnUrl2: config.get('cdn').get('2'), cdnUrl2: config.get('cdn').get('2'),
certificateAuthority: config.get('certificateAuthority'), certificateAuthority: config.get('certificateAuthority'),
environment: enableCI ? 'production' : config.environment, environment: enableCI ? 'production' : config.environment,
enableCI, enableCI: enableCI ? true : undefined,
node_version: process.versions.node, node_version: process.versions.node,
hostname: os.hostname(), hostname: os.hostname(),
appInstance: process.env.NODE_APP_INSTANCE, appInstance: process.env.NODE_APP_INSTANCE,

View file

@ -518,10 +518,12 @@ try {
getRegionCode: () => window.storage.get('regionCode'), getRegionCode: () => window.storage.get('regionCode'),
logger: window.log, logger: window.log,
}); });
window.CI = config.enableCI && { window.CI = config.enableCI
setProvisioningURL: url => ipc.send('set-provisioning-url', url), ? {
deviceName: title, setProvisioningURL: url => ipc.send('set-provisioning-url', url),
}; deviceName: title,
}
: undefined;
// these need access to window.Signal: // these need access to window.Signal:
require('./ts/models/messages'); require('./ts/models/messages');