Skip to content

Commit

Permalink
Merge pull request #14 from Shafley/patch-1
Browse files Browse the repository at this point in the history
fix bug for ctx.req.url contain `?`
  • Loading branch information
vagusX authored Dec 10, 2017
2 parents 22ddb6c + 950ee07 commit e12c4bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let eventRegistered = false
module.exports = (context, options) => (ctx, next) => {
// create a match function
const match = route(context)
if (!match(ctx.req.url)) return next()
if (!match(ctx.path)) return next()

let opts = Object.assign({}, options)
if (typeof options === 'function') {
Expand Down

0 comments on commit e12c4bc

Please sign in to comment.