mirror of
https://github.com/immich-app/immich.git
synced 2025-11-21 09:20:40 +09:00
fix: optional number inputs (#20218)
This commit is contained in:
@@ -49,6 +49,11 @@
|
||||
value = e.currentTarget.value;
|
||||
|
||||
if (inputType === SettingInputFieldType.NUMBER) {
|
||||
if (value === '' && !required) {
|
||||
value = null;
|
||||
return;
|
||||
}
|
||||
|
||||
let newValue = Number(value) || 0;
|
||||
if (newValue < min) {
|
||||
newValue = min;
|
||||
|
||||
Reference in New Issue
Block a user