From d2592c05a746d91a96b5efff5d0cea582f496e04 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 14 Mar 2021 19:42:43 +0100 Subject: [PATCH] Fix #14395 - Display Chart with timeline & series name column trigger JS error Signed-off-by: William Desportes --- js/src/chart.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/src/chart.js b/js/src/chart.js index 5344f0f7fb..26669dbb6f 100644 --- a/js/src/chart.js +++ b/js/src/chart.js @@ -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]]); } }