Skip to content

Commit d72b9a0

Browse files
committed
simplify z: null check
1 parent 9d024cc commit d72b9a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/marks/area.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ export function area(data, options) {
135135
}
136136

137137
export function areaX(data, options) {
138-
const {x, y, line, color, stroke = color, fill = color, z = x === fill || (line && x === stroke) ? null : undefined, ...rest} = maybeDenseIntervalY(options); // prettier-ignore
138+
const {x, y, line, color, stroke = color, fill = color, z = x === fill || x === stroke ? null : undefined, ...rest} = maybeDenseIntervalY(options); // prettier-ignore
139139
return new (line ? AreaLine : Area)(data, maybeStackX({...rest, x, y1: y, y2: undefined, z, stroke, fill}));
140140
}
141141

142142
export function areaY(data, options) {
143-
const {x, y, line, color, stroke = color, fill = color, z = y === fill || (line && y === stroke) ? null : undefined, ...rest} = maybeDenseIntervalX(options); // prettier-ignore
143+
const {x, y, line, color, stroke = color, fill = color, z = y === fill || y === stroke ? null : undefined, ...rest} = maybeDenseIntervalX(options); // prettier-ignore
144144
return new (line ? AreaLine : Area)(data, maybeStackY({...rest, x1: x, x2: undefined, y, z, stroke, fill}));
145145
}

0 commit comments

Comments
 (0)