Skip to content

Commit

Permalink
fix(core): skip nested mapping for array prop if destination identifi…
Browse files Browse the repository at this point in the history
…er is primitive
  • Loading branch information
nartc committed Jul 13, 2022
1 parent 6b0b5ae commit d2327bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/lib/mappings/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,12 @@ Original error: ${originalError}`;
continue;
}

// if first is object but the destination identifier is a primitive
// then skip completely
if (isPrimitiveConstructor(destinationMemberIdentifier)) {
continue;
}

setMember(() =>
mapInitializedValue.map((each) =>
mapReturn(
Expand Down

0 comments on commit d2327bc

Please sign in to comment.