node-facebook-chat
node-facebook-chat copied to clipboard
getText() method is called on undefined variable
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.
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.