Fixed singlecharacter publication returning undefined rather than an empty array
This commit is contained in:
@@ -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 [];
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user