Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: fix render tag overwriting component data in fractal core (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
mihkeleidast authored Mar 21, 2020
1 parent 57082cd commit 5db7137
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tags/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (fractal, config) {
throw new Error(`Could not render component '${handle}' - component not found.`);
}

let innerContext = entity.isComponent ? entity.variants().default().getContext() : entity.getContext();
let innerContext = _.cloneDeep(entity.isComponent ? entity.variants().default().getContext() : entity.getContext());

if (token.contextStack !== undefined) {
innerContext = utils.defaultsDeep(Twig.expression.parse.apply(this, [token.contextStack, context]), innerContext);
Expand Down

0 comments on commit 5db7137

Please sign in to comment.