Fix #14395 - Display Chart with timeline & series name column trigger JS error

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-03-14 19:42:43 +01:00
parent 1325a23b2f
commit d2592c05a7
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -462,7 +462,11 @@ JQPlotTimelineChart.prototype.prepareData = function (dataTable) {
retRow = [];
retData[j - 1] = retRow;
}
if (d !== null) {
// See https://github.com/phpmyadmin/phpmyadmin/issues/14395 for the block
if (d !== null && typeof d === 'object') {
retRow.push([d.getTime(), row[j]]);
} else if (typeof d === 'string') {
d = new Date(d);
retRow.push([d.getTime(), row[j]]);
}
}