diff --git a/src/utils/string.ts b/src/utils/string.ts index 1bfc3b2..a0c2894 100644 --- a/src/utils/string.ts +++ b/src/utils/string.ts @@ -54,7 +54,11 @@ export function containsOnlyDigits(input: string): boolean { * @returns The unquoted string if it was quoted, otherwise the original string. */ export function unquoteIfQuoted(value: string, quoteCharacter: string): string { - if (value.startsWith(quoteCharacter) && value.endsWith(quoteCharacter)) { + if ( + quoteCharacter && + value.startsWith(quoteCharacter) && + value.endsWith(quoteCharacter) + ) { return value.slice(1, -1); // Remove first and last character } return value;