Fixed singlecharacter publication returning undefined rather than an empty array

This commit is contained in:
Stefan Zermatten
2015-05-06 12:11:37 +02:00
parent c4a8c4b7ba
commit 39f7548b8d

View File

@@ -1,5 +1,6 @@
Meteor.publish("singleCharacter", function(characterId){
userId = this.userId;
if (!userId) return [];
var char = Characters.findOne({
_id: characterId,
$or: [
@@ -30,5 +31,7 @@ Meteor.publish("singleCharacter", function(characterId){
{fields: {username: 1}}
),
];
} else {
return [];
}
});