Merge pull request #5 from FloNeu/patch-1

Exchanged for-each with vanilla for-loop
This commit is contained in:
Michael Barrett 2014-04-17 09:23:15 +01:00
commit af09eccaec

View File

@ -83,11 +83,10 @@
.match(/[-+]?[0-9]+[a-z]+/g); // match time groups (digit followed by time unit - i.e 5d 15m = 2 time groups)
if (groups !== null) {
for(var group in groups) {
var g = groups[group],
for( var i = 0; i < groups.length; i++ ) {
var g = groups[i],
value = g.match(/[0-9]+/g)[0],
unit = g.match(/[a-z]+/g)[0];
totalSeconds += getSeconds(value, unit);
}
}