From a8f57d6358c6441f6e397f3d7d6fa08d5774cb1d Mon Sep 17 00:00:00 2001 From: Hanjoung Lee Date: Tue, 22 Mar 2016 16:57:43 +0900 Subject: [PATCH] Fix bug when empty record --- benchmark/benchmark.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 63c0accb7..77dd1b88a 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -111,13 +111,13 @@ $(document).ajaxStop(function () { transInfo[date] = element['info']; engines.forEach(function(engine, index) { var sum = undefined; // default value - var max = undefined; // default value + var max = undefined; // default value var maxTest = ''; // default value var numTests = 0; var benchmark_obj = element[benchmark]; if (benchmark_obj) { var record = benchmark_obj[measureType][engine]; - if (record) { + if (record && Object.keys(record).length > 0) { sum = Object.sum(record); maxTest = Object.maxKey(record); max = record[maxTest];