Merge pull request #5 from FloNeu/patch-1
Exchanged for-each with vanilla for-loop
This commit is contained in:
commit
af09eccaec
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user