Skip to content

Commit

Permalink
replace a 'let' with 'const' in lib/logout.js
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Aug 21, 2020
1 parent a2f139e commit d159a31
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/logout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@ const cmd = (args, cb) => logout(args).then(() => cb()).catch(cb)

const logout = async (args) => {
const { registry, scope } = npm.flatOptions
const regRef = `${scope}:registry`
let reg = registry

if (scope) {
const scopedRef = npm.flatOptions[regRef]
reg = scopedRef || reg
}
const regRef = scope ? `${scope}:registry` : 'registry'
const reg = npm.flatOptions[regRef] || registry

const auth = getAuth(reg, npm.flatOptions)

Expand Down

0 comments on commit d159a31

Please sign in to comment.