forked from abner/for-legacy-web
fix: bug in user/channel mention when query text is empty (#659)
parent
fc0c7611d4
commit
ba99cbaf2a
|
|
@ -88,7 +88,7 @@ export function useAutoComplete(
|
|||
? "emoji"
|
||||
: "user",
|
||||
search.toLowerCase(),
|
||||
j + 1,
|
||||
current === ":" ? j + 1 : j,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -242,7 +242,7 @@ export function useAutoComplete(
|
|||
);
|
||||
} else if (state.type === "user") {
|
||||
content.splice(
|
||||
index - 1,
|
||||
index,
|
||||
search.length + 1,
|
||||
"<@",
|
||||
state.matches[state.selected]._id,
|
||||
|
|
@ -250,7 +250,7 @@ export function useAutoComplete(
|
|||
);
|
||||
} else {
|
||||
content.splice(
|
||||
index - 1,
|
||||
index,
|
||||
search.length + 1,
|
||||
"<#",
|
||||
state.matches[state.selected]._id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue