]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Replace `.values` method with `.map` 1559/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 27 Mar 2017 16:51:09 +0000 (19:51 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 27 Mar 2017 16:51:09 +0000 (19:51 +0300)
as `.values` is unsupported in many browsers

interface/js/app/history.js

index 02c277d2fb4fd0fa7b142086326345140b82d85d..045b0636b65e3f42a4932359472dd53b032c3eb8 100644 (file)
@@ -78,7 +78,10 @@ function($, _, Humanize) {
                }
                item.symbols[key].str = str;
             });
-            item.symbols = Object.values(item.symbols).
+            item.symbols = Object.keys(item.symbols).
+                map(function(key) {
+                    return item.symbols[key];
+                }).
                 sort(function(e1, e2) {
                     return Math.abs(e1.score) < Math.abs(e2.score);
                 }).