diff --git a/src/linecomps.tsx b/src/linecomps.tsx index 39e9d191..d35289c9 100644 --- a/src/linecomps.tsx +++ b/src/linecomps.tsx @@ -240,7 +240,13 @@ class LineCmd extends React.Component<{screen : LineContainerModel, line : LineT return; } let metaElemWidth = metaElem.offsetWidth; + if (metaElemWidth == 0) { + return; + } let metaChild = metaElem.firstChild; + if (metaChild == null) { + return; + } let children = metaChild.childNodes; let childWidth = 0; for (let i=0; i metaElemWidth); - if (isOverflow != this.isOverflow.get()) { + if (isOverflow && isOverflow != this.isOverflow.get()) { mobx.action(() => { this.isOverflow.set(isOverflow); })();