node-facebook-chat icon indicating copy to clipboard operation
node-facebook-chat copied to clipboard

getText() method is called on undefined variable

Open kristian-ackar opened this issue 11 years ago • 1 comments

In stanza.js: line 44, getText method is called sometimes on undefined object.

Possible solution is to wrap that part of code in try catch block from outside. Temporary solution is to change that line of code to following: typeof vcard.getChild('PHOTO').getChild('EXTVAL') !== 'undefined' ? vcard.getChild('PHOTO').getChild('EXTVAL').getText() : ''

This bug crashes facebook chat on starvibes for users. It is not always present, it occurs under unknown circumstances.

kristian-ackar avatar Sep 02 '13 16:09 kristian-ackar

I will fork your project and submit pull request. Please verify changes quickly and upgrade module. We need this bugfix because we use facebook-chat module on big project starvibes.com in production.

kristian-ackar avatar Sep 02 '13 17:09 kristian-ackar