From 3c5b54cf72625947970ccf3cbbc257159b94d0c5 Mon Sep 17 00:00:00 2001 From: Victor Basumatary <77960480+victorbasumatary@users.noreply.github.com> Date: Wed, 7 Dec 2022 13:06:17 +0530 Subject: [PATCH] Fix truthiness check I think the original author intended to return the given value if it was truthy --- src/common/Mapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Mapper.ts b/src/common/Mapper.ts index 2b46502b78..42c0c7f568 100644 --- a/src/common/Mapper.ts +++ b/src/common/Mapper.ts @@ -16,7 +16,7 @@ export function mapArray(value: T[] | undefined, clazz?: Callable): T[] { } function mapInternal(value: any, clazz?: Callable): T { - if (!value) { + if (!!value) { return value; }