We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fc5f2d commit 6ab4a3fCopy full SHA for 6ab4a3f
src/helper/modify-shape-helper.ts
@@ -59,8 +59,12 @@ export default class ModifyShapeHelper {
59
static setPosition =
60
(pos: ShapeCoordinates) =>
61
(element: XmlDocument | XmlElement): void => {
62
- const xfrm = element.getElementsByTagName('a:off')[0]
63
- .parentNode as XmlElement;
+ const aOff = element.getElementsByTagName('a:off');
+ if (!aOff?.item(0)) {
64
+ return;
65
+ }
66
+
67
+ const xfrm = aOff.item(0).parentNode as XmlElement;
68
69
Object.keys(pos).forEach((key) => {
70
let value = Math.round(pos[key]);
0 commit comments