From 57ab5b9655a094d1f7e9256fc4505ee4809c5d42 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 24 Nov 2023 11:02:19 -0500 Subject: [PATCH] Don't descend into items that aren't broken when looking for the line break node. (mathjax/MathJax#3135) --- ts/output/common/Wrapper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/output/common/Wrapper.ts b/ts/output/common/Wrapper.ts index 2ab30d1e8..4d324e4bf 100644 --- a/ts/output/common/Wrapper.ts +++ b/ts/output/common/Wrapper.ts @@ -625,7 +625,10 @@ export class CommonWrapper< * @return {[WW, WW]} The embellished mo node and its core mo */ public getBreakNode(bbox: LineBBox): [WW, WW] { - const [i, j] = bbox.start || [0, 0]; + if (!bbox.start) { + return [this, null] as any as [WW, WW]; + } + const [i, j] = bbox.start; if (this.node.isEmbellished) { return [this, this.coreMO()] as any as [WW, WW]; }