loleaflet/src/control/Control.LokDialog.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 94fce780e3ea5fccae0920b885b64c8e3ae57f67 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Jan 6 19:41:45 2020 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Mon Jan 6 20:01:51 2020 +0200 Try to avoid "TypeError: undefined is not an object" Change-Id: I19942728166b57e493fb04086d7588c74bdb49ef diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 6f9b1dfd3..836151b34 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -172,13 +172,13 @@ L.Control.LokDialog = L.Control.extend({ // Create a rectangle string of form "x,y,width,height" // if params are missing, assumes 0,0,dialog width, dialog height _createRectStr: function(id, x, y, width, height) { - if (!width) + if (!width && id !== null) width = this._dialogs[parseInt(id)].width; - if (width <= 0) + if (!width || width <= 0) return null; - if (!height) + if (!height && id !== null) height = this._dialogs[parseInt(id)].height; - if (height <= 0) + if (!height || height <= 0) return null; if (!x) x = 0; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits