Skip to content

Commit fe435c6

Browse files
committed
chore(tests): renovate tests
1 parent bf373ce commit fe435c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

__tests__/modify-chart-scatter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ test('create presentation, add and modify a scatter chart.', async () => {
4949
})
5050
.write(`modify-chart-scatter.test.pptx`)
5151

52-
expect(result.charts).toBe(2);
52+
expect(result.charts).toBe(4);
5353
});

src/helper/xml-elements.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export default class XmlElements {
9191
dPt.appendChild(this.spPr());
9292

9393
const nextSibling = this.element.getElementsByTagName('c:cat')[0];
94-
nextSibling.parentNode.insertBefore(dPt, nextSibling)
94+
if(nextSibling) {
95+
nextSibling.parentNode.insertBefore(dPt, nextSibling)
96+
}
9597

9698
return this;
9799
}

0 commit comments

Comments
 (0)