Explorar o código

Fixed subsecond intervals in interval_to_seconds

Rashid Khan %!s(int64=12) %!d(string=hai) anos
pai
achega
5dd1c55627
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      js/shared.js

+ 1 - 1
js/shared.js

@@ -192,7 +192,7 @@
 
   // histogram & trends
   kbn.interval_to_seconds = function(string) {
-    var matches = string.match(/(\d+)([Mwdhmsy])/);
+    var matches = string.match(/(\d+(?:\.\d+)?)([Mwdhmsy])/);
     switch (matches[2]) {
     case 'y': 
       return matches[1]*31536000;