Mango-information-systems / twitto_be

twitto_be is a real-time tweets analytics dashboard
https://twitto.be
Other
12 stars 2 forks source link

tweetBot crash when no tweets are present #143

Closed mef closed 4 years ago

mef commented 5 years ago

tweetBot crashes wenever there are not enough tweets to have top n mentions / hashtags.

/[...]/controller/tweetBot.js:30
                        topMentions = '@' + msg.entities.topMentions[0].key + ', @' + msg.entities.topMentions[1].key + ' and @' + msg.entities.topMentions[2].key
                                                                        ^
TypeError: Cannot read property 'key' of undefined
    at process.<anonymous> (/[...]/controller/tweetBot.js:30:52)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

To be fixed by disabling the tweetBot whenever there is not enough content.

mef commented 4 years ago

implemented in v4.0.0