Skip to content

Commit

Permalink
update: Add parens to clarify order of operations when defaulting where
Browse files Browse the repository at this point in the history
Credit: @iarna
  • Loading branch information
iarna committed May 5, 2018
1 parent 3232699 commit 74bcdb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function update_ (args) {
// use the initial installation method (repo, tar, git) for updating
if (url.parse(ww.req).protocol) ww.what = ww.req

const where = ww.dep.parent && ww.dep.parent.path || ww.dep.path
const where = (ww.dep.parent && ww.dep.parent.path) || ww.dep.path
const isTransitive = !(ww.dep.requiredBy || []).some((p) => p.isTop)
const key = where + ':' + String(isTransitive)
if (!toInstall[key]) toInstall[key] = {where: where, opts: {saveOnlyLock: isTransitive}, what: []}
Expand Down

0 comments on commit 74bcdb8

Please sign in to comment.