Skip to content

Commit

Permalink
Fix login error when options is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
tamorim committed May 22, 2017
1 parent fd7ab44 commit 37b777e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/auth/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export default {
},
],
handler: async (options) => {
const optionAccount = options.a || options.account
const optionWorkspace = options.w || options.workspace
const optionAccount = options ? (options.a || options.account) : null
const optionWorkspace = options ? (options.w || options.workspace) : null
const usePrevious = !(optionAccount && optionWorkspace) && details && await promptUsePrevious()
const account = optionAccount || (usePrevious && cachedAccount) || await promptAccount()
const workspace = optionWorkspace || (usePrevious && cachedWorkspace) || 'master'
Expand Down

0 comments on commit 37b777e

Please sign in to comment.