-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: basepath should be case-insensitive #138
feat: basepath should be case-insensitive #138
Conversation
use-location.js
Outdated
@@ -20,7 +20,7 @@ export default ({ base = "" } = {}) => { | |||
// unfortunately, we can't rely on `path` value here, since it can be stale, | |||
// that's why we store the last pathname in a ref. | |||
const checkForUpdates = () => { | |||
const pathname = currentPathname(base); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get the old name back, please 🙏
currentPathname
is just more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, I just want to reduce the number of bytes
@molefrog done. please review again. |
Codecov Report
@@ Coverage Diff @@
## master #138 +/- ##
=======================================
Coverage 99.50% 99.50%
=======================================
Files 7 7
Lines 200 200
Branches 35 35
=======================================
Hits 199 199
Misses 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @cbbfcd!
The CI is failing, but that's because of a problem with codecov command. I'll fix that later.
hello, @molefrog
The wouter
matcher
is case-insensitive by default, so thebasepath
should be case-insensitive default too ?keep
pathname
andbasepath
with the same default behavior, so we can reducing user confusion.Of course, we can also provide a
sensitive
parameter, but it should be applied tomatcher
andbasepath
at the same time, otherwise, we will ignore case by default.Do you have any suggestions?