From 3253e4ec5677e88c376083f5c300bdafade06cc8 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 12 Oct 2023 18:05:48 +0530 Subject: [PATCH] SDA-4290 - Update check to validate object length (#1979) --- src/app/auto-update-handler.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/auto-update-handler.ts b/src/app/auto-update-handler.ts index 87620a868..cbfedaef5 100644 --- a/src/app/auto-update-handler.ts +++ b/src/app/auto-update-handler.ts @@ -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;