Skip to content

Commit

Permalink
clone manually the context to only clone interesting part
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Aug 23, 2023
1 parent 54c0b9e commit e40a83e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/JsonParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,18 @@ export class JsonParser<T> {
this.propagateDecorators(jsonClass, obj, key, context, methodName, argumentIndex);

// BVER: was cloneDeep
const newContext = clone(context);
// const newContext = clone(context);
const newContext = {
withContextGroups: [],
features: {
deserialization: {}
},
deserializers: [],
injectableValues: {},
decoratorsEnabled: {},
_internalDecorators: new Map(),
...context
};

if (jsonClass && jsonClass.type) {
newContext.mainCreator = jsonClass.type();
Expand Down

0 comments on commit e40a83e

Please sign in to comment.