pangratz / irc-log-viewer

CouchApp using Ember.js to show IRC logs stored in a CouchDB
MIT License
22 stars 5 forks source link

Uncaught TypeError: Cannot read property 'text' of undefined #5

Closed pangratz closed 12 years ago

pangratz commented 12 years ago

When accessing some entries which have an empty string as message text.

Uncaught TypeError: Cannot read property 'text' of undefined
IRC.set.Ember.ArrayProxy.extend.addMessageirc/controller:6
IRC.set.Ember.Object.create.loadDay.$.couch.db.view.successirc/main:26
IRC.set.Ember.Object.create.loadDay.$.couch.db.view.successirc/main:25
$.ajax.$.extend.$.extend.completejquery.couch.js:661
jQuery.Callbacks.firebpm_libs.js:2178
jQuery.Callbacks.self.fireWithbpm_libs.js:2296
donebpm_libs.js:8546
jQuery.ajaxTransport.send.callback

All objects in question can be retrieved via map function:

function(doc) {
  if (!doc.text && !doc.message) {
    emit(null, doc);
  }
}