From aa4c731fe2d5b12778d465d145c42e1a8efea703 Mon Sep 17 00:00:00 2001 From: neutiyoo Date: Wed, 4 Mar 2020 16:44:19 +0900 Subject: [PATCH] refactor: unnecessary ternary operation --- OpenIdAuthentication/lambda/index.js | 4 ++-- QuickSightAuthentication/lambda/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenIdAuthentication/lambda/index.js b/OpenIdAuthentication/lambda/index.js index ae2aea8..fff7385 100755 --- a/OpenIdAuthentication/lambda/index.js +++ b/OpenIdAuthentication/lambda/index.js @@ -154,8 +154,8 @@ const sendRes = (event, context, callback) => { roleArn = cognitoUnAuthorizedRoleArn; } - const resetDisabled = resetDisabledParam === "true" ? true : false; - const undoRedoDisabled = undoRedoDisabledParam === "true" ? true : false; + const resetDisabled = resetDisabledParam === "true"; + const undoRedoDisabled = undoRedoDisabledParam === "true"; const registerUserPromise = registerUser(accountId, sessionName, roleArn); registerUserPromise.then(function(){ diff --git a/QuickSightAuthentication/lambda/index.js b/QuickSightAuthentication/lambda/index.js index d6bf43d..99fb49e 100755 --- a/QuickSightAuthentication/lambda/index.js +++ b/QuickSightAuthentication/lambda/index.js @@ -78,8 +78,8 @@ const sendRes = (event, context, callback) => { callback(error); } - const resetDisabled = resetDisabledParam === "true" ? true : false; - const undoRedoDisabled = undoRedoDisabledParam === "true" ? true : false; + const resetDisabled = resetDisabledParam === "true"; + const undoRedoDisabled = undoRedoDisabledParam === "true"; const getDashboardEmbedUrlPromise = getDashboardURL(accountId, dashboardId, userArn, resetDisabled, undoRedoDisabled); getDashboardEmbedUrlPromise.then(function(result){