Skip to content

Commit eaedd62

Browse files
cliffanoisaacs
authored andcommitted
Improved read-installed to not rely on version files order.
1 parent 5429db9 commit eaedd62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils/read-installed.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ function readInstalled (args, cb) {
3434
if (activeVersion && data[package][activeVersion]) {
3535
data[package][activeVersion].active = true
3636
}
37-
if (!version || version.charAt(0) === ".") return listed()
38-
if (version !== "active") {
37+
if (!version) return listed()
38+
if (version !== "active" && version.charAt(0) !== ".") {
3939
data[package][version] = data[package][version] || {}
4040
return process.nextTick(V)
4141
}

0 commit comments

Comments
 (0)