[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Mar 15 10:59:09 UTC 2019
loleaflet/src/control/Control.LokDialog.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 3e0d5475342a9d7c0e9e4fc2897b61ea0d2b315d
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:53:45 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