HabitRPG / habitica-chat-extension

A habitica.com Chat Client for Chrome
18 stars 13 forks source link

chat popup does not appear when user not in party (Chrome) #41

Closed Alys closed 5 years ago

Alys commented 5 years ago

This bug occurs on the Chrome extension. I haven't tested for it on Firefox.

When my user account is not in a party, the chat pop-ups don't appear.

The console says: Uncaught TypeError: Cannot read property 'getElementsByTagName' of undefined for chat_inPage.js:862

When I click on the script name in that message, the console takes me to this line in the extension's source code:

var groupDIVs = document.getElementsByClassName('groupsBox_content')[0].getElementsByTagName("div");

When I join a party and reload the website, the extension then works as expected. If I leave the party and reload again, the same error as above reappears, so it does seem related to being in a party.

benjaminbhollon commented 5 years ago

I'll fix this and also add a message if you're not in any guilds while I'm at it.