aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorAutumnVN <autumnvnchino@gmail.com>2023-08-25 19:30:12 +0700
committerGitHub <noreply@github.com>2023-08-25 14:30:12 +0200
commitebe10d3fad85fc46b7df1637807734d950cd70bb (patch)
treea498cc95165532b95def658e894410f92e6bfcc1 /src/components
parenteca4af829f5e900fc6308a9f81f16b6c0e2cc5d5 (diff)
downloadVencord-ebe10d3fad85fc46b7df1637807734d950cd70bb.tar.gz
Vencord-ebe10d3fad85fc46b7df1637807734d950cd70bb.tar.bz2
Vencord-ebe10d3fad85fc46b7df1637807734d950cd70bb.zip
customRPC fixes (#1666)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src/components')
-rw-r--r--src/components/PluginSettings/components/SettingTextComponent.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/PluginSettings/components/SettingTextComponent.tsx b/src/components/PluginSettings/components/SettingTextComponent.tsx
index 9eccb10..abf1bbb 100644
--- a/src/components/PluginSettings/components/SettingTextComponent.tsx
+++ b/src/components/PluginSettings/components/SettingTextComponent.tsx
@@ -33,11 +33,10 @@ export function SettingTextComponent({ option, pluginSettings, definedSettings,
const isValid = option.isValid?.call(definedSettings, newValue) ?? true;
if (typeof isValid === "string") setError(isValid);
else if (!isValid) setError("Invalid input provided.");
- else {
- setError(null);
- setState(newValue);
- onChange(newValue);
- }
+ else setError(null);
+
+ setState(newValue);
+ onChange(newValue);
}
return (