From: Vsevolod Stakhov Date: Thu, 30 Mar 2017 10:22:22 +0000 (+0100) Subject: [WebUI] Fix legacy history X-Git-Tag: 1.5.5~79 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6861798ac32905996694d21186d3eb9aeb015682;p=rspamd.git [WebUI] Fix legacy history Issue: #1564 --- diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 24fd7f98a..c04c004ea 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -427,9 +427,17 @@ function($, _, Humanize) { .map(function (d){ return d.data; }); if (neighbours_data.length > 0) { var data = {}; - data.rows = [].concat.apply([], neighbours_data - .map(function(e) {return e.rows;})); - data.version = neighbours_data[0].version; + if (neighbours_data[0].version) { + data.rows = [].concat.apply([], neighbours_data + .map(function (e) { + return e.rows; + })); + data.version = neighbours_data[0].version; + } + else { + // Legacy version + data = [].concat.apply([], neighbours_data); + } var items = process_history_data(data); ft.history = FooTable.init("#historyTable", {