mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-13 18:59:22 -05:00
fix: bug in user/channel mention when query text is empty (#659)
This commit is contained in:
parent
fc0c7611d4
commit
ba99cbaf2a
1 changed files with 3 additions and 3 deletions
|
@ -88,7 +88,7 @@ export function useAutoComplete(
|
||||||
? "emoji"
|
? "emoji"
|
||||||
: "user",
|
: "user",
|
||||||
search.toLowerCase(),
|
search.toLowerCase(),
|
||||||
j + 1,
|
current === ":" ? j + 1 : j,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ export function useAutoComplete(
|
||||||
);
|
);
|
||||||
} else if (state.type === "user") {
|
} else if (state.type === "user") {
|
||||||
content.splice(
|
content.splice(
|
||||||
index - 1,
|
index,
|
||||||
search.length + 1,
|
search.length + 1,
|
||||||
"<@",
|
"<@",
|
||||||
state.matches[state.selected]._id,
|
state.matches[state.selected]._id,
|
||||||
|
@ -250,7 +250,7 @@ export function useAutoComplete(
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
content.splice(
|
content.splice(
|
||||||
index - 1,
|
index,
|
||||||
search.length + 1,
|
search.length + 1,
|
||||||
"<#",
|
"<#",
|
||||||
state.matches[state.selected]._id,
|
state.matches[state.selected]._id,
|
||||||
|
|
Loading…
Reference in a new issue