diff options
Diffstat (limited to 'src/components/PluginSettings')
-rw-r--r-- | src/components/PluginSettings/components/SettingTextComponent.tsx | 9 |
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 ( |