loleaflet/src/control/Ruler.js | 3 +++ 1 file changed, 3 insertions(+)
New commits: commit 6a7a8a8ace164b4bf6b5f55b3615a660ec700600 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Jul 31 17:19:51 2020 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Mon Aug 3 18:49:23 2020 +0200 loleaflet: fix uncaught type error on resize It happens when the ruler call "fixOffset" function Change-Id: I3a61147bd9b0d9bc705d9f6a70c06bd5345d660a Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99907 Tested-by: Jenkins Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js index 707a79dd8..79c89ae37 100644 --- a/loleaflet/src/control/Ruler.js +++ b/loleaflet/src/control/Ruler.js @@ -401,6 +401,9 @@ L.Control.Ruler = L.Control.extend({ /// from the tiles that we have already. var tiles = this._map._docLayer._tiles; var firstTileKey = Object.keys(tiles)[0]; + if (!firstTileKey) { + return; + } var columnNumber = parseInt(firstTileKey.match(/(\d*):/)[1]); var firstTile = tiles[firstTileKey].el; var firstTileXTranslate = parseInt(firstTile.style.left) - this._map._docLayer._tileWidthPx * columnNumber; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits