visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

fix:Omit query and hash part if both apears in path #590

Open aliraad79 opened 2 years ago

aliraad79 commented 2 years ago

Hi As mentioned in #575 issue if path have both ?foo=bar and # foo the page.js only removes # foo part so i fix this in this commit and now the output is: canonicalPath /foo?hello=there pathname /foo canonicalPath /foo#hash pathname /foo canonicalPath /foo?hello=there#hash pathname /foo

It's my first time contributing to this repo so I'm very happy if anyone has a comment on this. also i run test and everything works fine