From 0b11595657519c9d074e7522cca77686660989fb Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Mon, 6 May 2019 15:55:45 +0200 Subject: [PATCH] Fixed an issue where adding items from libraries didn't get all their properties --- .../inventory/itemLibraryDialog/itemLibraryDialog.js | 2 +- app/server/publications/library.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.js b/app/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.js index c21a9aba..9df2c381 100644 --- a/app/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.js +++ b/app/client/views/character/inventory/itemLibraryDialog/itemLibraryDialog.js @@ -30,7 +30,7 @@ Template.itemLibraryDialog.onCreated(function(){ if (_.contains(categoryKeys, key)){ handle = librarySubs.subscribe("standardLibraryItems", key); } else { - handle = librarySubs.subscribe("libraryItems", key); + handle = librarySubs.subscribe("fullLibraryItems", key); } this.autorun(() => { this.readyDict.set(key, handle.ready()); diff --git a/app/server/publications/library.js b/app/server/publications/library.js index 94d9df78..a46d58ed 100644 --- a/app/server/publications/library.js +++ b/app/server/publications/library.js @@ -63,6 +63,12 @@ Meteor.publish("libraryItems", function(libraryId){ }); }); +Meteor.publish("fullLibraryItems", function(libraryId){ + return LibraryItems.find({ + library: libraryId + }); +}); + Meteor.publish("libraryItem", function(itemId){ let cursor = LibraryItems.find(itemId); let item = cursor.fetch()[0];