Skip to content

[FIX] API to retrieve rooms was returning empty objects#9737

Merged
rodrigok merged 2 commits intodevelopfrom
hotfix/empty-rooms
Feb 17, 2018
Merged

[FIX] API to retrieve rooms was returning empty objects#9737
rodrigok merged 2 commits intodevelopfrom
hotfix/empty-rooms

Conversation

@rodrigok
Copy link
Copy Markdown
Member

@RocketChat/core

Closes #9531

@rodrigok rodrigok added this to the 0.62.0 milestone Feb 15, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-9737 February 15, 2018 22:27 Inactive
console.log('Empty Room for Subscription', item);
return {};
});
data = data.filter(item => item);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is weird to see, but it works 😂

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose returning null evaluates to false during the filter resulting in null being excluded?

Very odd looking indeed 😁

@rodrigok rodrigok merged commit a62a6ab into develop Feb 17, 2018
@rodrigok rodrigok deleted the hotfix/empty-rooms branch February 17, 2018 18:01
@rodrigok rodrigok mentioned this pull request Feb 28, 2018
@rodrigok rodrigok changed the title [FIX] API to retrive rooms was returning empty objects [FIX] API to retrieve rooms was returning empty objects May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] API rooms.get may be returning empty object when caching isn't found

4 participants