diff --git a/.changeset/spotty-lizards-jump.md b/.changeset/spotty-lizards-jump.md new file mode 100644 index 0000000..1a719a5 --- /dev/null +++ b/.changeset/spotty-lizards-jump.md @@ -0,0 +1,5 @@ +--- +"@connectk12/ik12": patch +--- + +Resolve issue with sanitizeText opts.removeWhitespace diff --git a/src/helpers.ts b/src/helpers.ts index 7722182..0a3ff1a 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -37,7 +37,7 @@ export const sanitizeText = ( sanitizedText = sanitizedText.replace(/[^a-zA-Z0-9\s]/g, ""); } if (opts.removeWhitespace) { - sanitizedText = sanitizedText.replace(/\s+/g, " "); + sanitizedText = sanitizedText.replace(/\s+/g, ""); } if (opts.uppercase) { sanitizedText = sanitizedText.toLocaleUpperCase();