Skip to content

Commit 5452eb7

Browse files
authored
Update index.ts
Fix issue "Support for angular 9" (jf3096#46)
1 parent f3159d2 commit 5452eb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ export function deserialize<T extends IGenericObject>(Clazz: {new(): T}, json: I
184184
* pass value to instance
185185
*/
186186
if (decoratorMetaData && decoratorMetaData.customConverter) {
187-
instance[key] = decoratorMetaData.customConverter.fromJson(json[decoratorMetaData.name || key]);
187+
instance[key as keyof T] = decoratorMetaData.customConverter.fromJson(json[decoratorMetaData.name || key]);
188188
} else {
189-
instance[key] = decoratorMetaData ? mapFromJson(decoratorMetaData, instance, json, key) : json[key];
189+
instance[key as keyof T] = decoratorMetaData ? mapFromJson(decoratorMetaData, instance, json, key) : json[key];
190190
}
191191

192192
});

0 commit comments

Comments
 (0)