Fetching
/home/james/projects/mtg/node_modules/tutor/lib/gatherer/card.js:149
s?[)]$/.exec($('.textRating').text().replace(/\s+/g, '')), _i = _ref.length -
^
TypeError: Cannot read property 'length' of null
at extract (/home/james/projects/mtg/node_modules/tutor/lib/gatherer/card.js:149:128)
at /home/james/projects/mtg/node_modules/tutor/lib/gatherer/card.js:24:24
at Request._callback (/home/james/projects/mtg/node_modules/tutor/lib/gatherer.js:62:16)
at Request.self.callback (/home/james/projects/mtg/node_modules/tutor/node_modules/request/request.js:122:22)
at Request.emit (events.js:110:17)
at Request.<anonymous> (/home/james/projects/mtg/node_modules/tutor/node_modules/request/request.js:1019:14)
at Request.emit (events.js:129:20)
at IncomingMessage.<anonymous> (/home/james/projects/mtg/node_modules/tutor/node_modules/request/request.js:970:12)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)
I'm unable to catch the error that results from passing an invalid name into
tutor.card
. This is my test:The output:
Tutor version 0.0.6 Node version 0.12.3