Skip to content

Commit 4324026

Browse files
authored
fix initializer composition (#896)
1 parent d5883c5 commit 4324026

File tree

3 files changed

+76
-76
lines changed

3 files changed

+76
-76
lines changed

src/transforms/initializer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export function composeInitializer(i1, i2) {
1111
if (i1 == null) return i2 === null ? undefined : i2;
1212
if (i2 == null) return i1 === null ? undefined : i1;
1313
return function(data, facets, channels, scales, dimensions) {
14-
let c1, c2;
15-
({data, facets, channels: c1} = i1.call(this, data, facets, channels, scales, dimensions));
16-
({data, facets, channels: c2} = i2.call(this, data, facets, {...channels, ...c1}, scales, dimensions));
17-
return {data, facets, channels: {...c1, ...c2}};
14+
let c1, d1, f1, c2, d2, f2;
15+
({data: d1 = data, facets: f1 = facets, channels: c1} = i1.call(this, data, facets, channels, scales, dimensions));
16+
({data: d2 = d1, facets: f2 = f1, channels: c2} = i2.call(this, d1, f1, {...channels, ...c1}, scales, dimensions));
17+
return {data: d2, facets: f2, channels: {...c1, ...c2}};
1818
};
1919
}

0 commit comments

Comments
 (0)