Skip to content

Commit

Permalink
add flag to always use first route
Browse files Browse the repository at this point in the history
  • Loading branch information
artzhookov committed Jan 11, 2017
1 parent abb5afb commit b682c9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mocky.js
Expand Up @@ -58,7 +58,7 @@ module.exports.createServer = function(routes, params) {

var matched = routes.filter(getReqMatcher(req));
if (matched.length) {
if (matched.length === 1) {
if (params.useFirstRoute || matched.length === 1) {
var routeRes = matched[0].res;

if (helpers.isFunction(routeRes)) {
Expand Down

0 comments on commit b682c9a

Please sign in to comment.