diff options
author | isaacs <i@izs.me> | 2020-08-21 22:55:39 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-08-21 22:55:39 +0300 |
commit | d159a31a2236882c8ee963ef0443c19a7b7e171f (patch) | |
tree | 3ab6ee76c79286cfd6046df7fca0f9af72cad5a9 /lib/logout.js | |
parent | a2f139e986443493a7ccd7c238a785d47f4b5f2f (diff) |
replace a 'let' with 'const' in lib/logout.js
Diffstat (limited to 'lib/logout.js')
-rw-r--r-- | lib/logout.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/logout.js b/lib/logout.js index 128a62692..861a50a23 100644 --- a/lib/logout.js +++ b/lib/logout.js @@ -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) |