[Libreoffice-commits] online.git: Branch 'libreoffice-7-0' - loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 16 20:39:17 UTC 2020


 loleaflet/src/control/Ruler.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 689ab28b7d3a1f13692bd72377a50da44554526e
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jun 15 06:46:45 2020 +0300
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Tue Jun 16 22:38:59 2020 +0200

    Guard against uncaught exception when tileContainer.style is undefined
    
    Happened at least for me in the iOS app.
    
    Change-Id: Ie6f2e30c757ed5dec92dc94da52f9a055731666b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96308
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96309
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96448
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index ab6b61435..4ec19dd98 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -415,7 +415,9 @@ L.Control.Ruler = L.Control.extend({
 				break;
 			}
 		}
-		var tileContainerXTranslate = parseInt(tileContainer.style.transform.match(/\(([-0-9]*)/)[1]);
+		var tileContainerXTranslate = 0;
+		if (tileContainer.style !== undefined)
+			tileContainerXTranslate = parseInt(tileContainer.style.transform.match(/\(([-0-9]*)/)[1]);
 		var mapPaneXTranslate = parseInt(mapPane.style.transform.match(/\(([-0-9]*)/)[1]);
 
 		var rulerOffset = mapPaneXTranslate + firstTileXTranslate + tileContainerXTranslate + (this.options.tileMargin * scale);


More information about the Libreoffice-commits mailing list