Skip to content

Commit

Permalink
utils: check npm.config existence in error-handler.js (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeniCheni authored and zkat committed Dec 10, 2018
1 parent 02c837e commit 90e55a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/error-handler.js
Expand Up @@ -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,
Expand Down

0 comments on commit 90e55a1

Please sign in to comment.