Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
fix(compat): check path.toNamespacedPath before call (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
edvardchen authored and zkat committed Oct 12, 2018
1 parent 2e49693 commit 3bc00f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pkgmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function resolve (...p) {
pkgMap = pkgMapCache.get(pkgMapPath)
} else {
try {
const p = path.toNamespacedPath(pkgMapPath)
const p = path.toNamespacedPath ? path.toNamespacedPath(pkgMapPath) : pkgMapPath
pkgMap = JSON.parse(fs.readFileSync(p))
pkgMapCache.set(pkgMapPath, pkgMap)
} catch (err) {
Expand Down

0 comments on commit 3bc00f5

Please sign in to comment.