diff --git a/lib/cache.js b/lib/cache.js index a47665c1ef113..3a4681b2af107 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -80,7 +80,7 @@ const add = async (args, where) => { ' npm cache add \n' log.silly('cache add', 'args', args) const spec = args[0] + - (args[1] === undefined || args[1] === null ? `@${args[1]}` : '') + (args[1] === undefined || args[1] === null ? '' : `@${args[1]}`) log.verbose('cache add', 'spec', spec) if (!spec) {