From 0ca36cbd5b081dd3387f4fbf59160d4a8fbaf0a9 Mon Sep 17 00:00:00 2001 From: Igor Faoro Date: Mon, 13 Apr 2020 10:28:30 -0300 Subject: [PATCH] changed init instance in deserialize function --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 5ef5a14..33bfdcf 100644 --- a/index.ts +++ b/index.ts @@ -172,7 +172,7 @@ export function deserialize(Clazz: {new(): T}, json: I /** * init root class to contain json */ - let instance = new Clazz(); + let instance = {}; Object.keys(instance).forEach((key: string) => { /** @@ -191,7 +191,7 @@ export function deserialize(Clazz: {new(): T}, json: I }); - return instance; + return instance; } /**