From d159a31a2236882c8ee963ef0443c19a7b7e171f Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 21 Aug 2020 12:55:39 -0700 Subject: replace a 'let' with 'const' in lib/logout.js --- lib/logout.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3