Skip to content

Commit

Permalink
Fixes request params incorrectly return
Browse files Browse the repository at this point in the history
  • Loading branch information
hehehai authored and kettanaito committed Mar 3, 2020
1 parent 995300e commit 771897b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/handleIncomingRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ export const createIncomingRequestHandler = (
}

// Retrieve request URL parameters based on the provided mask
const params = relevantRequestHandler.mask
const match = relevantRequestHandler.mask
? matchPath(req.url, { path: relevantRequestHandler.mask })
: {}
: { params: {} }

const requestWithParams = {
...req,
params,
params: match.params,
}

const mockedResponse:
Expand Down

0 comments on commit 771897b

Please sign in to comment.