diff --git a/lib/split_interval.js b/lib/split_interval.js index 7862ae83cd000..d19ce50fac89f 100644 --- a/lib/split_interval.js +++ b/lib/split_interval.js @@ -1,11 +1,11 @@ module.exports = function splitInterval(interval) { - if (!interval.match(/[0-9]+[mshdwMy]/g)) { + if (!interval.match(/[0-9]+[mshdwMy]+/g)) { throw new Error ('Malformed `interval`: ' + interval); } - var parts = interval.match(/[0-9]+|[mshdwMy]/g); + var parts = interval.match(/[0-9]+|[mshdwMy]+/g); return { count: parts[0], unit: parts[1] }; -}; \ No newline at end of file +}; diff --git a/package.json b/package.json index a03865dcf681b..fd4f6246d0684 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "timelion", - "version": "5.0.0-0.1.305", + "version": "5.0.0-0.1.306", "dependencies": { "body-parser": "^1.12.0", "boom": "^2.8.0",