Skip to content

Commit

Permalink
fix: return correct children when building landing node
Browse files Browse the repository at this point in the history
  • Loading branch information
deeonwuli committed Feb 12, 2024
1 parent 57df58e commit da24060
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/data/repositories/LandingNodeDefaultRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ export class LandingNodeDefaultRepository implements LandingNodeRepository {
: [];

const validations = roots.map(root =>
LandingNodeModel.decode(buildDomainLandingNode(root, _.flatten(persisted)))
LandingNodeModel.decode(
buildDomainLandingNode(
root,
persisted.find(model => model.find(item => item.parent === root.id)) ?? []
)
)
);

_.forEach(validations, validation => {
Expand Down

0 comments on commit da24060

Please sign in to comment.