mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 01:09:55 +00:00
[Glitch] Fix language detection sometimes kicking in *after* posting
Port 30e334b51a to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -378,6 +378,7 @@ export const LanguageDropdown: React.FC = () => {
|
|||||||
if (text.length > 20) {
|
if (text.length > 20) {
|
||||||
debouncedGuess(text, setGuess);
|
debouncedGuess(text, setGuess);
|
||||||
} else {
|
} else {
|
||||||
|
debouncedGuess.cancel();
|
||||||
setGuess('');
|
setGuess('');
|
||||||
}
|
}
|
||||||
}, [text, setGuess]);
|
}, [text, setGuess]);
|
||||||
|
|||||||
Reference in New Issue
Block a user