* Fix default assistant model settings where temperature value 0 fails to trigger updates #5456

Signed-off-by: LeeSH <shuhao_lin@fzzixun.com>

* fix: remove console.log

Signed-off-by: LeeSH <shuhao_lin@fzzixun.com>

* fix: use simple condition to tell value  (#5456)
*use  value not equal null to  tell false condition
Signed-off-by: LeeSH <shuhao_lin@fzzixun.com>

---------

Signed-off-by: LeeSH <shuhao_lin@fzzixun.com>
Co-authored-by: Lee SH <shuhao_lin@fzzixun.com>
This commit is contained in:
nmnmtttt 2025-04-30 22:52:18 +08:00 committed by GitHub
parent aaf396f83a
commit d571c46aad

View File

@ -47,7 +47,7 @@ const AssistantSettings: FC = () => {
const handleChange =
(setter: Dispatch<SetStateAction<number>>, updater: (value: number) => void) => (value: number | null) => {
if (!!value && !isNaN(value)) {
if (value !== null) {
setter(value)
updater(value)
}