frctl / twig

Use Twig templates with Fractal.
32 stars 34 forks source link

use _.merge instead of _.assign for deep objects #38

Closed samuelbirch closed 4 years ago

mihkeleidast commented 4 years ago

can you give some context for these changes? e.g. what issues are you running into that these changes will resolve?

samuelbirch commented 4 years ago

i'm rendering a component and using with to override the default context specified in the config file. the problem i was encounting was that because the context has nested objects i couldn't override a single nested attribute:

context: { module: { text: "" } }

this change allows that ability.

hope that makes sense.