[Libreoffice-commits] online.git: loleaflet/src
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 28 08:13:47 UTC 2020
loleaflet/src/control/Control.JSDialogBuilder.js | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 70084f48dd14667df15ef6022d423eda01e8b729
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Feb 25 10:50:43 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Apr 28 10:13:29 2020 +0200
jsdialog: build frame also without title
Change-Id: Id5f94eb90756419305ab5d593791663ecb5eb41b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93026
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 225e92ad9..9f500751f 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -548,10 +548,13 @@ L.Control.JSDialogBuilder = L.Control.extend({
},
_frameHandler: function(parentContainer, data, builder) {
- data.text = builder._cleanText(data.children[0].text);
- var contentNode = data.children[1];
-
- builder._explorableEntry(parentContainer, data, contentNode, builder);
+ if (data.children.length > 1) {
+ data.text = builder._cleanText(data.children[0].text);
+ var contentNode = data.children[1];
+ builder._explorableEntry(parentContainer, data, contentNode, builder);
+ } else {
+ return true;
+ }
return false;
},
@@ -1823,6 +1826,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
build: function(parent, data) {
this._amendJSDialogData(data);
for (var childIndex in data) {
+ if (!data[childIndex])
+ continue;
+
var childData = data[childIndex];
if (!childData)
continue;
More information about the Libreoffice-commits
mailing list