Skip to content
Snippets Groups Projects
Commit 9a679d61 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Fix error with underscore string

parent 5c191485
No related branches found
No related tags found
No related merge requests found
RocketChat.checkUsernameAvailability = (username) ->
return not Meteor.users.findOne({ username: { $regex : new RegExp("^" + _.trim(username) + "$", "i") } })
\ No newline at end of file
return not Meteor.users.findOne({ username: { $regex : new RegExp("^" + s.trim(username) + "$", "i") } })
\ No newline at end of file
RocketChat.setUsername = (user, username) ->
username = _.trim username
username = s.trim username
if not user or not username
return false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment