From a4aaa2d4de9d1886852e4811707ddb1c2c8925e2 Mon Sep 17 00:00:00 2001 From: lazpavel <85319655+lazpavel@users.noreply.github.com> Date: Wed, 25 Aug 2021 11:05:57 -0400 Subject: [PATCH] fix(amplify-category-auth): fixed walkthrough prompt after choosing same web & native app clients (#7954) * fix(amplify-category-auth): fixed walkthrough prompt after choosing same web & native app clients * fix(amplify-category-auth): fixed walkthrough prompt after choosing same web & native app clients --- .../provider-utils/awscloudformation/import/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts index b40da57311b..8ba304cbe5f 100644 --- a/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts +++ b/packages/amplify-category-auth/src/provider-utils/awscloudformation/import/index.ts @@ -415,7 +415,7 @@ const selectAppClients = async ( answers: ImportAnswers, ): Promise => { let autoSelected = 0; - let changeAppClientSelction = false; + let changeAppClientSelection = false; do { // Select web application clients if (questionParameters.webClients!.length === 1) { @@ -480,12 +480,13 @@ const selectAppClients = async ( answers.appClientNative = questionParameters.nativeClients!.find(c => c.ClientId! === appClientNativeId); answers.appClientNativeId = undefined; // Only to be used by enquirer - if (answers.appClientNative === answers.appClientWeb) { - changeAppClientSelction = await context.prompt.confirm(importMessages.ConfirmUseDifferentAppClient); - } + changeAppClientSelection = + answers.appClientNative === answers.appClientWeb + ? await context.prompt.confirm(importMessages.ConfirmUseDifferentAppClient) + : false; } questionParameters.bothAppClientsWereAutoSelected = autoSelected === 2; - } while (changeAppClientSelction); + } while (changeAppClientSelection); }; const appClientsOAuthPropertiesMatching = async (