Send more data to sentry about messages.reverse error

This commit is contained in:
James Allen 2015-01-07 13:16:31 +00:00
parent 10653c12fd
commit dd5562f9b6

View file

@ -50,6 +50,8 @@ define [
chat.state.loading = false
if messages.length < MESSAGE_LIMIT
chat.state.atEnd = true
if !messages.reverse?
Raven?.captureException(new Error("messages has no reverse property"), { messages: messages })
messages.reverse()
prependMessages(messages)
chat.state.nextBeforeTimestamp = chat.state.messages[0]?.timestamp