Permalink
Browse files

Fix #2717 Don't hasOwnProperty on objects lacking it

  • Loading branch information...
isaacs committed Aug 15, 2012
1 parent 6291b93 commit 4184226e500b35ab2b5bda10997b4a801cbd0249
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/npm.js
View
@@ -357,7 +357,7 @@ function loadPrefix (npm, conf, cb) {
// try to guess at a good node_modules location.
var p
, gp
- if (!conf.hasOwnProperty("prefix")) {
+ if (!Object.prototype.hasOwnProperty.call(conf, "prefix")) {
p = process.cwd()
} else {
p = npm.config.get("prefix")

0 comments on commit 4184226

Please sign in to comment.