fix: anon chans

This commit is contained in:
cha0s 2020-12-14 14:08:56 -06:00
parent c372c1c28e
commit fd4a2be361

View File

@ -56,8 +56,8 @@ export const channelState = async (req, latus, channel) => {
export const channelsToHydrate = async (req, latus) => {
const {channel, user} = req;
if (!user && channel) {
return channelIsAnonymous(channel) ? [channel] : [];
if (!user) {
return (channel && channelIsAnonymous(channel)) ? [channel] : [];
}
const {User} = ModelMap(latus);
const channels = await Promise.all(