helloandre / glycerin

Google Chat Terminal User Interface
MIT License
32 stars 3 forks source link

TypeError: Cannot read property 'threads' of undefined #2

Closed ispivey closed 4 years ago

ispivey commented 4 years ago

I was AFK, came back to my computer, and saw the following stack trace in the bottom left corner of the terminal UI:

TypeError: Cannot read property 'threads' of undefined
    at EventEmitter.<anonymous> (/Users/ispivey/src/glycerin/src/lib/model/chat.js:227:31)
    at EventEmitter.emit (events.js:310:20)
    at /Users/ispivey/src/glycerin/src/lib/api/events.js:71:20
    at Array.forEach (<anonymous>)
    at IncomingMessage.<anonymous> (/Users/ispivey/src/glycerin/src/lib/api/events.js:70:43)
    at IncomingMessage.emit (events.js:310:20)
    at addChunk (_stream_readable.js:286:12
    at readableAddChunk (_stream_readable.js:264:11)    
    at IncomingMessage.Readable.push (_stream_readable.js:209:10)
    at HTTPParser.parserOnBody (_http_common.js:132:24)
helloandre commented 4 years ago

this should be fixed. was inferring what an object from an event was incorrectly: https://github.com/helloandre/glycerin/commit/35974e3be8529f4ccff3a6817d42c36729166613#diff-cfb26f1e56acef620028d93076eda4fcR288