mantrajs / meteor-mantra-kickstarter

Kickstart your meteor mantra development
MIT License
184 stars 50 forks source link

Meteor 1.3 beta 11 , TypeError: Collections is undefined #21

Closed gantu closed 8 years ago

gantu commented 8 years ago

I am getting TypeError: Collections is undefined on meteor 13 beta 11. Collections inside composers can not been identified.

export const collectionComposer = ({context}, onData) => {
  const {Meteor, Collections} = context();
  if (Meteor.subscribe('_colors.list').ready()) {
    const collection = Collections._colors.find().fetch();
    onData(null, {collection});
  }
};

What can be the issue?

fallenpeace commented 8 years ago

is Collections in your context?

gantu commented 8 years ago

I have fixed the issue, it was more mantra spec related than meteor. By properly exporting the problem is fixed.

natecox commented 8 years ago

@gantu can you document your fix for this (code sample) in case other come across it too?