Skip to content

Commit

Permalink
fix: handle alias file with no orgs prop
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Oct 25, 2023
1 parent 52472c9 commit c59c7c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stateAggregator/accessors/aliasAccessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ const fileContentsRawToAliasStore = (contents: string): Map<string, string> => {
[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]));
};

Expand Down

0 comments on commit c59c7c7

Please sign in to comment.