Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug for omitting query and hash from pathname #575

Open
shokai opened this issue Sep 23, 2020 · 0 comments
Open

bug for omitting query and hash from pathname #575

shokai opened this issue Sep 23, 2020 · 0 comments

Comments

@shokai
Copy link

shokai commented Sep 23, 2020

Hi, I found a bug and I'm reporting it.

  • The querystring is removed from the pathname.
  • The hash is also removed from the pathname.
  • If I add both querystring and hash, the querystring are not removed from the pathname.
const page = require('./')

page('/foo', ctx => {
  console.log('canonicalPath', ctx.canonicalPath)
  console.log('pathname', ctx.pathname)
})

page('/foo?hello=there')
page('/foo#hash')
page('/foo?hello=there#hash') // query and hash

output

canonicalPath /foo?hello=there
pathname /foo
canonicalPath /foo#hash
pathname /foo
canonicalPath /foo?hello=there#hash
pathname /foo?hello=there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant