Skip to content

Commit d0e5c09

Browse files
committed
Removed the Empty if block
1 parent 4ca6436 commit d0e5c09

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/contentstackClient.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ export default function contentstackClient ({ http }) {
4545
const { mfaSecret, ...credentials } = requestBody
4646
requestBody = credentials
4747

48-
if (requestBody?.tfa_token) {
49-
// tfa_token is already in credentials, no need to do anything
50-
} else if (mfaSecret) {
48+
if (!requestBody.tfa_token && mfaSecret) {
5149
requestBody.tfa_token = authenticator.generate(mfaSecret)
5250
}
5351
return http.post('/user-session', { user: requestBody }, { params: params })

0 commit comments

Comments
 (0)