Skip to content

Commit

Permalink
Merge pull request #969 from forcedotcom/cd/handle-alias-file-no-orgs
Browse files Browse the repository at this point in the history
fix: handle alias file with no `orgs` prop
  • Loading branch information
mshanemc authored Oct 26, 2023
2 parents 52472c9 + ce1ebcb commit 55a7f3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stateAggregator/accessors/aliasAccessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ const fileContentsRawToAliasStore = (contents: string): Map<string, string> => {
[DEFAULT_GROUP]: { [alias: string]: string };
};

return new Map(Object.entries(fileContents[DEFAULT_GROUP]));
// handle when alias file exists but is missing the org property
return new Map(Object.entries(fileContents[DEFAULT_GROUP] ?? {}));
};

const aliasStoreToRawFileContents = (aliasStore: Map<string, string>): string =>
Expand Down

0 comments on commit 55a7f3d

Please sign in to comment.