SDA-4290 - Update check to validate object length (#1979)

This commit is contained in:
Kiran Niranjan 2023-10-12 18:05:48 +05:30 committed by GitHub
parent ee9e81037d
commit 3253e4ec56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ import { isUrl } from '../common/utils';
import { whitelistHandler } from '../common/whitelist-handler';
import { sendAutoUpdateAnalytics } from './bi/auto-update-analytics';
import { InstallActionTypes, InstallTypes } from './bi/interface';
import { config } from './config-handler';
import { config, IConfig } from './config-handler';
import { retrieveWindowsRegistry } from './registry-handler';
import { EChannelRegistry, RegistryStore } from './stores/registry-store';
import { windowHandler } from './window-handler';
@ -237,9 +237,9 @@ export class AutoUpdate {
const cc = config.getFilteredCloudConfigFields([
'betaAutoUpdateChannelEnabled',
]);
]) as IConfig;
this.channelConfigLocation =
'betaAutoUpdateChannelEnabled' in cc && cc.betaAutoUpdateChannelEnabled
Object.keys(cc).length === 0 || cc.betaAutoUpdateChannelEnabled
? ChannelConfigLocation.ACP
: ChannelConfigLocation.LOCALFILE;