diff --git a/libraries/helpers/src/utils/valid.url.path.ts b/libraries/helpers/src/utils/valid.url.path.ts index d7c18931..469f8229 100644 --- a/libraries/helpers/src/utils/valid.url.path.ts +++ b/libraries/helpers/src/utils/valid.url.path.ts @@ -8,11 +8,11 @@ import { export class ValidUrlExtension implements ValidatorConstraintInterface { validate(text: string, args: ValidationArguments) { return ( - text.endsWith('.png') || - text.endsWith('.jpg') || - text.endsWith('.jpeg') || - text.endsWith('.gif') || - text.endsWith('.mp4') + text?.endsWith('.png') || + text?.endsWith('.jpg') || + text?.endsWith('.jpeg') || + text?.endsWith('.gif') || + text?.endsWith('.mp4') ); }