Blaze data context difference between Meteor 1.5 vs 1.6

I used to work with Blaze with codes like this


        each val in datas
            tr: td#row= val

    datas: -> [
        name: 'foo', age: 33
        name: 'bar', age: 42
    'click #row': -> console.log this

When we click the table row, this is what happened

  • on Meteor 1.5 it returns an object {name: 'foo', age: 33}
  • on Meteor 1.6 it returns an empty object {}

Is this feature change/removed on purpose? If yes, how else can I get data from the element?

This should definitely not be happening as a result of an upgrade. I’ve upgraded several blaze apps with helpers exactly like yours without issue.

My suspicion is that it’s something to do with coffeescript. Have you tried to reproduce with vanillaJS?