loleaflet/src/control/Control.JSDialogBuilder.js |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit 70084f48dd14667df15ef6022d423eda01e8b729
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Feb 25 10:50:43 2020 +0100
Commit:     Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to