Parcourir la source

Fixed subsecond intervals in interval_to_seconds

Rashid Khan il y a 12 ans
Parent
commit
85fd491b13
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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;