Fix up docs

This commit is contained in:
Dragory 2020-07-30 13:08:06 +03:00
parent 743a5e9ce4
commit 7909c99a7f
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
35 changed files with 371 additions and 64 deletions

View file

@ -36,8 +36,8 @@ export const DocsStore: Module<DocsState, RootState> = {
const data = await get(`docs/plugins/${name}`);
if (data && data.commands) {
data.commands.sort((a, b) => {
const aName = a.trigger.toLowerCase();
const bName = b.trigger.toLowerCase();
const aName = (Array.isArray(a.trigger) ? a.trigger[0] : a.trigger).toLowerCase();
const bName = (Array.isArray(b.trigger) ? b.trigger[0] : b.trigger).toLowerCase();
if (aName > bName) return 1;
if (aName < bName) return -1;
return 0;