-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Conversation
* @param {Object} message - The message object | ||
*/ | ||
|
||
const MentionsClient = function MentionsClient(message) { |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can msg
be undefined?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
@RocketChat/core