diff --git a/background/script.js b/background/script.js index aaf8324..8819243 100644 --- a/background/script.js +++ b/background/script.js @@ -264,7 +264,7 @@ async function assumeRoleWithSAML(roleClaimValue, SAMLAssertion, SessionDuration RoleArn: RoleArn, SAMLAssertion: SAMLAssertion }; - if (SessionDuration !== null) { + if (SessionDuration !== null && SessionDuration !== "") { params['DurationSeconds'] = SessionDuration; } @@ -319,7 +319,7 @@ async function assumeRole(roleArn, roleSessionName, AccessKeyId, SecretAccessKey RoleArn: roleArn, RoleSessionName: roleSessionName }; - if (SessionDuration !== null) { + if (SessionDuration !== null && SessionDuration !== "") { params['DurationSeconds'] = SessionDuration; } const command = new webpacksts.AWSAssumeRoleCommand(params);