impronunciable / hackdash

Ideas for a hackathon
http://hackdash.org
MIT License
68 stars 61 forks source link

Collections seems to be not working #148

Closed ricardocasares closed 8 years ago

ricardocasares commented 8 years ago

For example this collection or any other:

Uncaught TypeError: Cannot read property '_id' of undefined
module.exports.Backbone.Marionette.ItemView.extend.templateHelpers.isAdmin @ hackdashApp.js?v=0.10.0:1282
(anonymous function) @ hackdashApp.js?v=0.10.0:6601
module.exports.HandlebarsCompiler.template.main @ hackdashApp.js?v=0.10.0:1431
ret @ hackdashApp.js?v=0.10.0:6840
r.Renderer.render @ vendor.js?v=0.10.0:7
r.ItemView.r.View.extend._renderTemplate @ vendor.js?v=0.10.0:7
r.ItemView.r.View.extend.render @ vendor.js?v=0.10.0:7
r.Region.r.Object.extend.show @ vendor.js?v=0.10.0:7
module.exports.Backbone.Marionette.LayoutView.extend.onRender @ hackdashApp.js?v=0.10.0:1377
(anonymous function) @ vendor.js?v=0.10.0:7
r.View.t.View.extend.triggerMethod @ vendor.js?v=0.10.0:7
r.ItemView.r.View.extend.render @ vendor.js?v=0.10.0:7
r.LayoutView.r.ItemView.extend.render @ vendor.js?v=0.10.0:7
r.Region.r.Object.extend.show @ vendor.js?v=0.10.0:7
(anonymous function) @ hackdashApp.js?v=0.10.0:300
j @ jquery.min.js:2
k.fireWith @ jquery.min.js:2
x @ jquery.min.js:4
b @ jquery.min.js:4

Seems to be in the next line on Collection.js:

  templateHelpers: {
    isAdmin: function(){
      return hackdash.user && hackdash.user._id === this.owner._id; // Seems to be this line.
    }
  },
pjnovas commented 8 years ago

@ricardocasares thanks for report, I think is a server problem, the move to ES7 has broken Collections, I'm gonna check that out this afternoon.

pjnovas commented 8 years ago

@ricardocasares fixed!, thanks again fo report it ;)

ricardocasares commented 8 years ago

@pjnovas thank you! keep the good work :)