Skip to content

Commit

Permalink
fix(middleware): fix matcher path (#54)
Browse files Browse the repository at this point in the history
* chore(deps): update nuxtjs monorepo to v2.8.1

* fix(middleware): fix matcher path

(cherry picked from commit 75083e1)
  • Loading branch information
JoaoPedroAS51 authored and potato4d committed Aug 17, 2019
1 parent b8ae469 commit 3109bee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9,177 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@nuxt/vue-app": "2.8.1",
"@types/consola": "1.0.0",
"@types/jsdom": "12.2.4",
"@types/node": "10.14.15",
"@types/node": "10.14.6",
"nuxt": "2.8.1",
"prettier": "1.17.1",
"standard-version": "7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function createMiddleware(options: ModuleOptions) {
return async (req: any, res: any, next: () => void) => {
const { Nuxt } = require('nuxt')
const nuxt = new Nuxt(options.nuxt.options)
if (options.matcher && !matchRoute(req.path, options.matcher)) {
if (options.matcher && !matchRoute(req.url, options.matcher)) {
next()
return
}
Expand Down
Loading

0 comments on commit 3109bee

Please sign in to comment.