diff --git a/packages/common/src/services/utilities.ts b/packages/common/src/services/utilities.ts index 146932f85..a70c22269 100644 --- a/packages/common/src/services/utilities.ts +++ b/packages/common/src/services/utilities.ts @@ -917,7 +917,7 @@ export function parseUtcDate(inputDateString: any, useUtc?: boolean): string { * @returns */ export function removeAccentFromText(text: string, shouldLowerCase = false) { - const normalizedText = text?.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + const normalizedText = (typeof text.normalize === 'function') ? text.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : text; return shouldLowerCase ? normalizedText.toLowerCase() : normalizedText; }