[bugfix] Ensure the delete function is callable and correctly handled in config setters.

This commit is contained in:
Sakamoto Shiina
2025-11-13 15:55:00 +09:00
parent 3a31b0a9fe
commit 3105df3486
4 changed files with 51 additions and 16 deletions

View File

@@ -215,7 +215,9 @@ const DeeplAuthKey_Box = () => {
};
const saveFunction = () => {
if (input_value === "") return deleteDeepLAuthKey();
if (input_value === "" || input_value === null) {
return deleteDeepLAuthKey();
};
setDeepLAuthKey(input_value);
};