1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-10 09:56:24 +00:00

Don't clear input on error

This commit is contained in:
Elvyra 2025-01-03 23:56:45 +00:00 committed by GitHub
parent a31423034f
commit 5ae2d03c8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -77,7 +77,6 @@ export function SettingArrayComponent({
// TODO add picker for users etc? // TODO add picker for users etc?
if (option.type !== OptionType.ARRAY && !(inputElement.value.length >= 18 && inputElement.value.length <= 19 && !isNaN(Number(inputElement.value)))) { if (option.type !== OptionType.ARRAY && !(inputElement.value.length >= 18 && inputElement.value.length <= 19 && !isNaN(Number(inputElement.value)))) {
setError("Value is not a valid snowflake ID"); setError("Value is not a valid snowflake ID");
inputElement.value = "";
return; return;
} }
setItems([...items, inputElement.value]); setItems([...items, inputElement.value]);