AI Studio: fix saving null model id when selecting from Others list

70eb34086e0814c30be0cbb34c77a5e6a5e41e40

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +5 -0Showing whitespace changes
public/scripts/openai.js+5 -0
@@ -4628,6 +4628,11 @@ async function onModelChange() {
46284628 }
46294629
46304630 if ($(this).is('#model_google_select')) {
4631+ if (!value) {
4632+ console.debug('Null Google model selected. Ignoring.');
4633+ return;
4634+ }
4635+
46314636 console.log('Google model changed to', value);
46324637 oai_settings.google_model = value;
46334638 }