Skip to content

Commit 44f769f

Browse files
committed
only check if getSVGElement is undefined if it's the SVG renderer
1 parent ad7193e commit 44f769f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/barline_tests.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { TestOptions, VexFlowTests } from './vexflow_test_helpers';
77

8+
import { Renderer } from '../src';
89
import { Barline, BarlineType } from '../src/stavebarline';
910

1011
const BarlineTests = {
@@ -44,9 +45,11 @@ function simple(options: TestOptions): void {
4445
f.Formatter().joinVoices([voice]).formatToStave([voice], stave);
4546
f.draw();
4647

47-
notes.forEach((note) => {
48-
options.assert.notEqual(note.getSVGElement(), undefined);
49-
});
48+
if (options.backend === Renderer.Backends.SVG) {
49+
notes.forEach((note) => {
50+
options.assert.notEqual(note.getSVGElement(), undefined);
51+
});
52+
}
5053

5154
options.assert.ok(true, 'Simple Test');
5255
}

0 commit comments

Comments
 (0)