-
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 messageAttachment coffee to js #6500
converted messageAttachment coffee to js #6500
Conversation
} | ||
if (Meteor.isCordova && (url && url[0] === '/')) { | ||
url = Meteor.absoluteUrl().replace(/\/$/, '') + url; | ||
query = `rc_uid=${ Meteor.userId() }&rc_token=${ Meteor._localStorage.getItem('Meteor.loginToken') }`; |
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.
Why not declare the variable query
here as const?
return true; | ||
}, | ||
getImageHeight(height) { | ||
return height || 200; |
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.
You can use the param's default value here:
getImageHeight(height = 200) {
return height;
}
return '#D30230'; | ||
default: | ||
return this.color; | ||
} |
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.
A improvement for that IMO is:
const colors = {
good: '#35AC19',
warning: '#FCB316',
danger: '#D30230'
};
return colors[this.color] || this.color
afa023b
to
4e1d31e
Compare
@RocketChat/core