Skip to content

Commit

Permalink
fix: invalid URL error (#139)
Browse files Browse the repository at this point in the history
* fix: invalid URL error

* use req.path

* Update index.js
  • Loading branch information
krmax44 authored and egoist committed May 3, 2019
1 parent b574219 commit 636cd72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/saber/vue-renderer/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path')
const { EventEmitter } = require('events')
const url = require('url')
const { fs, slash } = require('saber-utils')
const { log } = require('saber-log')

Expand Down Expand Up @@ -423,7 +422,7 @@ class VueRenderer {
return render()
}

const pathname = decodeURI(new url.URL(req.url).pathname)
const pathname = decodeURI(req.path)

if (this.builtRoutes.has(pathname)) {
render()
Expand Down

0 comments on commit 636cd72

Please sign in to comment.