Skip to content

Commit e2d1cf2

Browse files
committed
throw new Error
1 parent 986a22a commit e2d1cf2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/transforms/select.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ export function selectLast(options) {
1010
}
1111

1212
export function selectMinX(options = {}) {
13-
if (options.x === undefined) throw "missing channel x";
13+
if (options.x === undefined) throw new Error("missing channel: x");
1414
return select(min, options.x, options);
1515
}
1616

1717
export function selectMinY(options = {}) {
18-
if (options.y === undefined) throw "missing channel y";
18+
if (options.y === undefined) throw new Error("missing channel: y");
1919
return select(min, options.y, options);
2020
}
2121

2222
export function selectMaxX(options = {}) {
23-
if (options.x === undefined) throw "missing channel x";
23+
if (options.x === undefined) throw new Error("missing channel: x");
2424
return select(max, options.x, options);
2525
}
2626

2727
export function selectMaxY(options = {}) {
28-
if (options.y === undefined) throw "missing channel y";
28+
if (options.y === undefined) throw new Error("missing channel: y");
2929
return select(max, options.y, options);
3030
}
3131

0 commit comments

Comments
 (0)