Skip to content

Commit

Permalink
fix(Windows): Drop Leading '\' on Windows from endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hypery2k authored Apr 25, 2019
1 parent 26269f4 commit 7171197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/controller/MockController.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ MockController.prototype = extend(MockController.prototype, {
* @private
*/
_acceptMiddleware: function (serverOptions, responseOptions) {
var endPointId = responseOptions.dir.replace(serverOptions.dirName, '').replace(/\/$/, '');
var endPointId = responseOptions.dir.replace(serverOptions.dirName, '').replace(/\/$/, '').replace('\\', '/');
var middleware = serverOptions.middleware;

if (!endPointId || !middleware || typeof middleware[endPointId] !== 'function') {
Expand Down

0 comments on commit 7171197

Please sign in to comment.