Skip to content
Snippets Groups Projects
Commit 3f20d7ad authored by Gabriel Engel's avatar Gabriel Engel Committed by GitHub
Browse files

Merge pull request #3572 from LearnersGuild/jw/sort-slash-commands-before-filtering

Fixes #3571: sort slash commands before filtering
parents ea004bee d510e6d0
No related branches found
No related tags found
No related merge requests found
......@@ -148,12 +148,11 @@ Template.messagePopupConfig.helpers
params: item.params
description: TAPi18n.__ item.description
if commands.length > 10
break
commands = commands.sort (a, b) ->
return a._id > b._id
commands = commands[0..10]
template.resultsLength.set commands.length
return commands
......
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