diff --git a/packages/commons/lib/utils.js b/packages/commons/lib/utils.js index 480b0c2471..c5b7d623d5 100644 --- a/packages/commons/lib/utils.js +++ b/packages/commons/lib/utils.js @@ -1,6 +1,6 @@ // Removes all leading and trailing slashes from a path exports.stripSlashes = function stripSlashes (name) { - return name.replace(/^(\/*)|(\/*)$/g, ''); + return name.replace(/^(\/+)|(\/+)$/g, ''); }; // A set of lodash-y utility functions that use ES6