We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7ee4e0 commit f887ac6Copy full SHA for f887ac6
1 file changed
ts/output/common/Wrapper.ts
@@ -1059,6 +1059,8 @@ export class CommonWrapper<
1059
if (!parent || !parent.isKind('mrow') || parent.childNodes.length === 1) {
1060
return;
1061
}
1062
+ const n = parent.childIndex(child);
1063
+ if (n === null) return;
1064
//
1065
// Get the lspace and rspace
1066
@@ -1075,8 +1077,7 @@ export class CommonWrapper<
1075
1077
// If there are two adjacent <mo>, use enough left space to make it
1076
1078
// the maximum of the rspace of the first and lspace of the second
1079
- const n = parent.childIndex(child);
- if (n === 0) return;
1080
+ if (!n) return;
1081
const prev = parent.childNodes[n - 1] as AbstractMmlNode;
1082
if (!prev.isEmbellished) return;
1083
const bbox = this.jax.nodeMap.get(prev).getBBox();
0 commit comments