Skip to content

Commit

Permalink
fix: do not use ancestor parse when the model defines a new dataset (v…
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz authored and BradyJ27 committed Oct 19, 2023
1 parent 6fa995c commit aef1466
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/compile/data/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,12 @@ export function parseData(model: Model): DataComponent {
let head = parseRoot(model, model.component.data.sources);

const {outputNodes, outputNodeRefCounts} = model.component.data;
const ancestorParse = model.parent ? model.parent.component.data.ancestorParse.clone() : new AncestorParse();
const data = model.data;

const newData = data && (isGenerator(data) || isUrlData(data) || isInlineData(data));
const ancestorParse =
!newData && model.parent ? model.parent.component.data.ancestorParse.clone() : new AncestorParse();

if (isGenerator(data)) {
// insert generator transform
if (isSequenceGenerator(data)) {
Expand Down

0 comments on commit aef1466

Please sign in to comment.