-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[@astrojs/image]: Fix <Picture /> component with query string #4997
[@astrojs/image]: Fix <Picture /> component with query string #4997
Conversation
🦋 Changeset detectedLatest commit: 859ddf4 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Thanks for opening this PR, always great to see a new issue and a bug fix PR opened at the same time! I'm really curious why this is passing in the 💯 agree it would be nice to have the tests refactored a little more to align what images are used. A few cases only make sense for |
Ah ha, @panwauu You were spot on with the Feel free to reach out if you're interested in working on a test refactor here! Happy to help get you setup to run the tests locally and walk through how they're working today 🙌 |
@@ -32,7 +32,7 @@ function removeExtname(src: string) { | |||
} | |||
|
|||
function basename(src: string) { | |||
return src.replace(/^.*[\\\/]/, ''); | |||
return removeQueryString(src.replace(/^.*[\\\/]/, '')); |
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.
This is the bug fix, basename
should be stripping off query params
Changes
Testing
Docs
As it is a bugfix, there is no documentation added.
Fixes #4996