Permalink
Browse files

fix a small bug in the UI javascript's timeUnit function

timeUnit() needs to return a two-item list, and it shouldn't subscript
numbers...

Author: @timjr
Fixes: #200
URL: #200
  • Loading branch information...
Tim Daly, Jr Franklin Hu
Tim Daly, Jr authored and Franklin Hu committed Nov 9, 2012
1 parent 2ca54ad commit 2238844f3855ec679c093b6aba5c30a99c754432
Showing with 1 addition and 4 deletions.
  1. +1 −4 zipkin-web/src/main/resources/public/js/zipkin.js
@@ -88,10 +88,7 @@ Zipkin.Util = (function(Zipkin) {
}
};
var timeUnit = function(value, m) {
- if (m.length == 1) {
- return value[0][1];
- }
- if (value < m[0][0]) {
+ if (m.length == 1 || value < m[0][0]) {
return [value, m[0][1]];
}
return timeUnit(value / m[0][0], m.slice(1));

0 comments on commit 2238844

Please sign in to comment.