From 640ff4fa50a5315cd961de02097bf470fec56058 Mon Sep 17 00:00:00 2001 From: Mic Date: Tue, 9 Sep 2025 23:36:00 +0200 Subject: [PATCH] getGPTWebModelString improved --- js/mzta-utils.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/mzta-utils.js b/js/mzta-utils.js index ba9e27d8..4cf2af8f 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -251,6 +251,7 @@ export function convertNewlinesToParagraphs(input) { // This method is used to convert the model string id used in the URL // to the model string used in the webpage export function getGPTWebModelString(model) { + if (!model) return ''; model = model.toLowerCase().trim(); switch (model) { case 'gpt-5': @@ -639,6 +640,7 @@ export function validateChatGPTWebCustomData(data) { } export function sanitizeChatGPTModelData(input) { + if(!input) return ''; return encodeURIComponent(input).toLowerCase() }