mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
small bug fixes
This commit is contained in:
parent
0d28817ac0
commit
7a3a467fbc
3 changed files with 8 additions and 6 deletions
|
@ -147,7 +147,7 @@ twitter@1.1.9
|
|||
ui@1.0.11
|
||||
underscore@1.0.8
|
||||
url@1.0.9
|
||||
utilities:react-list-container@0.1.11
|
||||
utilities:react-list-container@0.1.12
|
||||
utilities:smart-methods@0.1.4
|
||||
utilities:smart-publications@0.1.4
|
||||
webapp@1.2.8
|
||||
|
|
|
@ -121,13 +121,15 @@ Campaign.build = function (postsArray) {
|
|||
if (post.categories) {
|
||||
properties.categories = post.categories.map(categoryID => {
|
||||
const category = Categories.findOne(categoryID);
|
||||
if (category) {
|
||||
return {
|
||||
name: category.name,
|
||||
url: Categories.getUrl(category, true)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
console.log(properties)
|
||||
// console.log(properties)
|
||||
// generate post item HTML and add it to the postsHTML string
|
||||
postsHTML += Telescope.email.getTemplate('postItem')(properties);
|
||||
});
|
||||
|
|
|
@ -69,12 +69,12 @@ Meteor.publish('posts.list', function (terms) {
|
|||
// this.unblock(); // causes bug where publication returns 0 results
|
||||
|
||||
this.autorun(function () {
|
||||
|
||||
const currentUser = Meteor.users.findOne(this.userId);
|
||||
|
||||
terms.currentUserId = this.userId; // add currentUserId to terms
|
||||
const {selector, options} = Posts.parameters.get(terms);
|
||||
|
||||
// note: enabling Counts.publish messes up SSR
|
||||
Counts.publish(this, terms.listId, Posts.find(selector, options), {noReady: true});
|
||||
|
||||
options.fields = Posts.publishedFields.list;
|
||||
|
|
Loading…
Add table
Reference in a new issue