[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Mar 15 10:59:55 UTC 2019


 loleaflet/src/control/Control.LokDialog.js |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 3503dc9a07932079f193ccdee929a2a5a6b818d0
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Mar 15 12:53:45 2019 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Fri Mar 15 12:59:23 2019 +0200

    Guard against "TypeError: null is not an object"

diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 9b5774fc6..b8b7d7ed3 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -620,7 +620,10 @@ L.Control.LokDialog = L.Control.extend({
 	_onDialogChildClose: function(dialogId) {
 		$('#' + this._toStrId(dialogId) + '-floating').remove();
 		// remove any extra height allocated for the parent container
-		var canvasHeight = document.getElementById(dialogId + '-canvas').height;
+		var canvas = document.getElementById(dialogId + '-canvas');
+		if (!canvas)
+			return;
+		var canvasHeight = canvas.height;
 		$('#' + dialogId).height(canvasHeight + 'px');
 	},
 


More information about the Libreoffice-commits mailing list