isaacs/npm-registry-client — pull request #14 by mmalecki (2013-03-04 18:03:49+00:00)
Title: Fix scope in `publish` error handler

Fix crash:

npm ERR! TypeError: Cannot call method 'error' of undefined
npm ERR! at handle (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/publish.js:79:18)
npm ERR! at RegClient. (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/publish.js:88:24)
npm ERR! at cb (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/request.js:27:9)
npm ERR! at RegClient. (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/request.js:148:10)
npm ERR! at cb (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/request.js:158:9)
npm ERR! at RegClient. (/Users/maciej/dev/js/npm/node_modules/npm-registry-client/lib/request.js:223:20)
npm ERR! at self.callback (/Users/maciej/dev/js/npm/node_modules/request/main.js:120:22)
npm ERR! at Request.EventEmitter.emit (events.js:124:20)
npm ERR! at ClientRequest.self.clientErrorHandler (/Users/maciej/dev/js/npm/node_modules/request/main.js:222:10)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:94:17)