Skip to content

Commit

Permalink
fix: add a check if the idp id exists
Browse files Browse the repository at this point in the history
  • Loading branch information
SwaySway committed Nov 3, 2021
1 parent b8d838d commit d782bec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export interface GQLDiff {
current: DiffableProject;
}

export const getIdentityPoolId = async (ctx: $TSContext): Promise<string | any> => {
export const getIdentityPoolId = async (ctx: $TSContext): Promise<string | undefined> => {
const { allResources, resourcesToBeDeleted } = await ctx.amplify.getResourceStatus('auth');
const authResources = pullAllBy(allResources, resourcesToBeDeleted, 'resourceName');
const authResource = find(authResources, { service: 'Cognito', providerPlugin: providerName }) as any;
return authResource.output.IdentityPoolId;
return authResource?.output?.IdentityPoolId;
};

export const getAdminRoles = async (ctx: $TSContext, apiResourceName: string): Promise<Array<string>> => {
Expand Down

0 comments on commit d782bec

Please sign in to comment.