[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 26 20:58:25 UTC 2020
loleaflet/src/control/Control.JSDialogBuilder.js | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 19190f539e10358dd7584e34438d8d11f9ec2498
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed Feb 26 21:50:03 2020 +0530
Commit: Jan Holesovsky <kendy at collabora.com>
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 <kendy at collabora.com>
Reviewed-by: Jan Holesovsky <kendy at 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;
More information about the Libreoffice-commits
mailing list