Skip to content

Commit

Permalink
Merge pull request #27 from boxfish/patch-1
Browse files Browse the repository at this point in the history
Fix the Relay Transform visit order
  • Loading branch information
jheer committed Dec 5, 2018
1 parent a4cd58d commit 6ed7a8d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/vega-dataflow/src/transforms/Relay.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ prototype.transform = function(_, pulse) {

if (_.derive) {
out = pulse.fork();


pulse.visit(pulse.REM, function(t) {
out.rem.push(lut[t._id]);
lut[t._id] = null;
});

pulse.visit(pulse.ADD, function(t) {
var dt = derive(t);
lut[t._id] = dt;
Expand All @@ -40,11 +45,6 @@ prototype.transform = function(_, pulse) {
pulse.visit(pulse.MOD, function(t) {
out.mod.push(rederive(t, lut[t._id]));
});

pulse.visit(pulse.REM, function(t) {
out.rem.push(lut[t._id]);
lut[t._id] = null;
});
}

return out;
Expand Down

0 comments on commit 6ed7a8d

Please sign in to comment.