diff options
author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-06-09 12:46:25 -0400 |
---|---|---|
committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-06-09 12:46:25 -0400 |
commit | 7d38e4a98a0382cdd032d63d375707f19362873d (patch) | |
tree | 415273805b218e07a4ad9e4c547e26469c4b0e13 /src/client/goldenLayout.js | |
parent | 9de05a8fc6d1cda01662f9bce3a5f6764d280be3 (diff) | |
parent | 331cb0bec8089c4435126542ed3181fe227eff51 (diff) |
cleaned up code in InkTranscription
Diffstat (limited to 'src/client/goldenLayout.js')
-rw-r--r-- | src/client/goldenLayout.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/goldenLayout.js b/src/client/goldenLayout.js index 82b10608d..012ee163c 100644 --- a/src/client/goldenLayout.js +++ b/src/client/goldenLayout.js @@ -458,8 +458,9 @@ if (this._bDragging === true) { this._bDragging = false; this.emit('dragStop', oEvent, this._nOriginalX + this._nX); - } else if (oEvent.target) { // make title receive pointer events to allow setting insertion position or selecting texst range - if (oEvent.target.className.includes("lm_title_wrap")) { + } else { // make title receive pointer events to allow setting insertion position or selecting texst range + const classname = typeof oEvent.target?.className === "string" ? oEvent.target.className : ""; + if (classname.includes("lm_title_wrap")) { oEvent.target.children[0].style.pointerEvents = "all"; oEvent.target.children[0].focus(); } @@ -1431,7 +1432,7 @@ this.root.callDownwards('_$init'); if (config.maximisedItemId === '__glMaximised') { - this.root.getItemsById(config.maximisedItemId)[0].toggleMaximise(); + this.root.getItemsById(config.maximisedItemId)[0]?.toggleMaximise(); } }, |