loleaflet/src/control/Control.JSDialogBuilder.js | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit c22b29f864c8ce8b6a1a41251f3a7039de91b88b Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Wed Feb 26 21:50:03 2020 +0530 Commit: Jan Holesovsky <ke...@collabora.com> CommitDate: Thu Feb 27 18:12:00 2020 +0100 Fix js crash when jsdialog invoked on piecharts For some reason, the parsed jsdialog message for piecharts in calc has element(s) with children that evaluates to undefined. Although we need to fix why there is such an child for any ui object, this is a quick fix that skips such entries, so that the chart dialog is shown without a crash in the console. Else the dialog wont appear. Change-Id: Iff11051bf775ece63ac9f0ca180b3c76d7d14e84 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89563 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 45a00d502..27781a8f8 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -1595,6 +1595,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ } for (var idx = 0; idx < data.length; ++idx) { + if (!data[idx]) + continue; var controlId = data[idx].id; if (controlId && this._missingLabelData.hasOwnProperty(controlId)) { data.splice(idx, 0, this._missingLabelData[controlId]); @@ -1613,6 +1615,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ this._amendJSDialogData(data); for (var childIndex in data) { var childData = data[childIndex]; + if (!childData) + continue; this._parentize(childData); var childType = childData.type; var processChildren = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits