From 03f2cfafabdb615435f59f0aa6021a50abf30638 Mon Sep 17 00:00:00 2001 From: Mic Date: Tue, 9 Sep 2025 23:36:00 +0200 Subject: [PATCH] handling also an undefined value --- js/mzta-utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/mzta-utils.js b/js/mzta-utils.js index b486f343..ba9e27d8 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -643,6 +643,7 @@ export function sanitizeChatGPTModelData(input) { } export function sanitizeChatGPTWebCustomData(input) { + if(!input) return ''; // Removes all characters that are not letters, numbers, dashes, or slashes return input.replace(/[^\p{L}\p{N}\/-]+/gu, ''); }