Skip to content

Commit f4f71df

Browse files
committed
Test fix
1 parent abb43b7 commit f4f71df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/fields/__tests__/AnnotationRef-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('<AnnotationRef>', () => {
2727
const options = drop.first().prop('options');
2828
expect(options.length).toBe(3);
2929
expect(options[0]).toEqual({label: 'Canvas', value: 'paper'});
30-
expect(options[1]).toEqual({label: 'Y', value: 'y'});
30+
expect(options[1]).toEqual({label: 'Y Axis 1', value: 'y'});
3131
expect(options[2]).toEqual({label: 'Y Axis: yaxis2 title', value: 'y2'});
3232
});
3333

@@ -114,7 +114,7 @@ describe('<AnnotationArrowRef>', () => {
114114
const options = drop.first().prop('options');
115115
expect(options.length).toBe(3);
116116
expect(options[0]).toEqual({label: 'in pixels', value: 'pixel'});
117-
expect(options[1]).toEqual({label: 'Y', value: 'y'});
117+
expect(options[1]).toEqual({label: 'Y Axis 1', value: 'y'});
118118
expect(options[2]).toEqual({label: 'Y Axis: yaxis2 title', value: 'y2'});
119119
});
120120
});

src/lib/getAllAxes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function axisIdToAxisName(id) {
6868
}
6969

7070
function getSubplotNumber(axis) {
71-
const splitSubplot = axis._subplot.split(axis._axisGroup);
71+
const splitSubplot = axis._subplot ? axis._subplot.split(axis._axisGroup) : [];
7272
return splitSubplot[1] ? Number(splitSubplot[1]) : 0;
7373
}
7474

0 commit comments

Comments
 (0)