handling also an undefined value
This commit is contained in:
parent
f833224b6a
commit
03f2cfafab
1 changed files with 1 additions and 0 deletions
|
|
@ -643,6 +643,7 @@ export function sanitizeChatGPTModelData(input) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sanitizeChatGPTWebCustomData(input) {
|
export function sanitizeChatGPTWebCustomData(input) {
|
||||||
|
if(!input) return '';
|
||||||
// Removes all characters that are not letters, numbers, dashes, or slashes
|
// Removes all characters that are not letters, numbers, dashes, or slashes
|
||||||
return input.replace(/[^\p{L}\p{N}\/-]+/gu, '');
|
return input.replace(/[^\p{L}\p{N}\/-]+/gu, '');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue