Hotfix subscribed libraries not showing up in add item from library dialog
This commit is contained in:
@@ -91,11 +91,14 @@ Template.itemLibraryDialog.helpers({
|
|||||||
},
|
},
|
||||||
customLibraries(){
|
customLibraries(){
|
||||||
let userId = Meteor.userId();
|
let userId = Meteor.userId();
|
||||||
|
let user = Meteor.user()
|
||||||
|
let subs = user && user.profile && user.profile.librarySubscriptions;
|
||||||
return Libraries.find({
|
return Libraries.find({
|
||||||
$or: [
|
$or: [
|
||||||
{readers: userId},
|
{readers: userId},
|
||||||
{writers: userId},
|
{writers: userId},
|
||||||
{owner: userId},
|
{owner: userId},
|
||||||
|
{public: true, _id: {$in: subs || []}},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user