From c59c7c7387f159537b9d352057299842f864b864 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Wed, 25 Oct 2023 13:42:49 -0300 Subject: [PATCH] fix: handle alias file with no `orgs` prop --- src/stateAggregator/accessors/aliasAccessor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stateAggregator/accessors/aliasAccessor.ts b/src/stateAggregator/accessors/aliasAccessor.ts index b5701f53f9..112b5fe6a3 100644 --- a/src/stateAggregator/accessors/aliasAccessor.ts +++ b/src/stateAggregator/accessors/aliasAccessor.ts @@ -281,6 +281,10 @@ const fileContentsRawToAliasStore = (contents: string): Map => { [DEFAULT_GROUP]: { [alias: string]: string }; }; + // old alias file may not have `orgs` prop + if (!fileContents[DEFAULT_GROUP]) { + fileContents[DEFAULT_GROUP] = {}; + } return new Map(Object.entries(fileContents[DEFAULT_GROUP])); };