loleaflet/src/control/Control.JSDialogBuilder.js | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 19190f539e10358dd7584e34438d8d11f9ec2498 Author: Dennis Francis <[email protected]> AuthorDate: Wed Feb 26 21:50:03 2020 +0530 Commit: Jan Holesovsky <[email protected]> CommitDate: Wed Feb 26 21:58:06 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/+/89574 Tested-by: Jan Holesovsky <[email protected]> Reviewed-by: Jan Holesovsky <[email protected]> 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 [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
