Allow matches of minutes vs minute, etc. as intended

This commit is contained in:
Bryan Ashby 2018-07-25 21:18:30 -06:00
parent 3522b8b6f8
commit 33790a74e3
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ exports.getModule = class LastCallersModule extends MenuModule {
getCollapse(conf) {
let collapse = _.get(this, conf);
collapse = collapse && collapse.match(/^([0-9]+)\s*(minutes|seconds|hours|days|months)$/);
collapse = collapse && collapse.match(/^([0-9]+)\s*(minutes?|seconds?|hours?|days?|months?)$/);
if(collapse) {
return moment.duration(parseInt(collapse[1]), collapse[2]);
}