gclem/overwatch-js

Cannot read property 'replace' of undefined

Closed this issue · 1 comments

Good evening,

I was trying to use Overwatch.getAll('pc', 'eu', 'TheDarangel#2161') when I faced this error:

TypeError: Cannot read property 'replace' of undefined
    at parseProfile (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\overwatch-js\lib\overwatch.js:148:65)
    at Promise (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\overwatch-js\lib\overwatch.js:262:34)
    at new Promise (<anonymous>)
    at rp.then (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\overwatch-js\lib\overwatch.js:261:21)
    at tryCatcher (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\promise.js:693:18)
    at Async._drainQueue (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\async.js:133:16)
    at Async._drainQueues (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\async.js:143:10)
    at Immediate.Async.drainQueues (C:\Users\TheDarangel\Desktop\nspire-ow-bot\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:773:18)
    at tryOnImmediate (timers.js:734:5)
    at processImmediate [as _immediateCallback] (timers.js:711:5)

Here is the career link: /career/pc/TheDarangel-2161

This may be related to the fact this career got two player-level divs ?

gclem commented

It works with Overwatch.getAll('pc', 'eu', 'TheDarangel-2161')

Just replace # by -