summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/error-handler.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/error-handler.js')
-rw-r--r--deps/npm/lib/utils/error-handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index c6481abf67..ba9d9f8e25 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -202,7 +202,7 @@ function errorHandler (er) {
msg.summary.concat(msg.detail).forEach(function (errline) {
log.error.apply(log, errline)
})
- if (npm.config.get('json')) {
+ if (npm.config && npm.config.get('json')) {
var error = {
error: {
code: er.code,