Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted rocketchat-mentions coffee to js #6467

Merged
merged 2 commits into from
Mar 29, 2017

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Mar 24, 2017

@RocketChat/core

* @param {Object} message - The message object
*/

const MentionsClient = function MentionsClient(message) {
Copy link
Member

Choose a reason for hiding this comment

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

Remove the var declaration


const MentionsClient = function MentionsClient(message) {
let msg = message.html;
if (!msg.trim()) {
Copy link
Member

Choose a reason for hiding this comment

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

Can msg be undefined?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that this parameter will not be undefined, but... I put a test let msg = (message && message.html) || '';

* @param {Object} message - The message object
*/

const MentionsServer = function(message) {
Copy link
Member

Choose a reason for hiding this comment

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

Use named function instead of var declaration

@engelgabriel engelgabriel merged commit 05af603 into RocketChat:develop Mar 29, 2017
@engelgabriel engelgabriel added this to the 0.55.0 milestone Mar 29, 2017
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.

4 participants