[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 15 04:21:01 UTC 2020


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

New commits:
commit 9e1b04aafa6ddc6db0634d680e7419cf3b9489d8
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Mon Jun 15 06:46:45 2020 +0300
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Jun 15 06:20:40 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>

diff --git a/loleaflet/src/control/Ruler.js b/loleaflet/src/control/Ruler.js
index cca4e46ed..011b16488 100644
--- a/loleaflet/src/control/Ruler.js
+++ b/loleaflet/src/control/Ruler.js
@@ -409,7 +409,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