我收到一个非常奇怪的错误:
Exception from sub sda4Ho8DT6MXTKjvb TypeError: Object #<Object> has no method 'find'
I20140728-11:22:25.248(-4)? at null._handler (app/server/publications.js:4:18)
这是我的代码。非常简单的pub / sub。不知道为什么我会收到这个错误。
publications.js
Meteor.publish('assets', function() {
//query = query || {};
//query.removed = false;
return Assets.find();
});
assets_col.js
Assets = new Meteor.Collection('assets');
router.js
waitOn: function() {
return Meteor.subscribe('assets');
}