From 1b899f248c65ed726a5e3e5649fcf9fec9d4d322 Mon Sep 17 00:00:00 2001 From: Guillaume Salicis Date: Fri, 31 Jul 2020 15:15:50 +0200 Subject: [PATCH] bugfix: handle undefined typeMeta.reflectedType in convert --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 71234b1..e6470ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -120,7 +120,7 @@ function applyConverters( meta.target as Function, meta.propertyName ) - const isMap = typeMeta && new typeMeta.reflectedType() instanceof Map + const isMap = typeMeta && typeMeta.reflectedType && new typeMeta.reflectedType() instanceof Map const converter = converters[meta.type] || converters[cv.ValidationTypes.CUSTOM_VALIDATION]