fix: convert model_type URL param to number so Select matches optionList value type

This commit is contained in:
xiezhouwei 2026-06-19 10:37:41 +08:00
parent 2165430d87
commit 0d798c2fbc
1 changed files with 4 additions and 1 deletions

View File

@ -591,7 +591,10 @@ const Playground = () => {
const modelParam = searchParams.get('model');
const modelTypeParam = searchParams.get('model_type');
if (modelTypeParam) {
handleInputChange('model_type', modelTypeParam);
const v = Number(modelTypeParam);
if (!Number.isNaN(v)) {
handleInputChange('model_type', v);
}
}
if (modelParam) {
handleInputChange('model', modelParam);