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

Fix broken image path #463

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Conversation

jean-the-coder
Copy link
Contributor

@jean-the-coder jean-the-coder commented Apr 23, 2024

Description

When I fixed the image fallback directive to not infinitely loop in #444, I accidentally updated the fallback path to /assets/images/no-image.svg instead of assets/images/no-image.svg. This is making the path be treated as an absolute and is ignoring the configured base href of /web/.

Didn't notice because storybook doesn't run under a base href. I wasn't able to figure out a way to make storybook run under a base ref like the normal site does, but if you run the site locally in sandbox mode you can see the difference between main and this branch as the Dynamic Health IT and AdvancedMD sources do not have images.

Changes

  • remove leading / in asset path of image fallback
  • update the image fallback directive to check if the current path ends with the default image path instead of checking for exact equality.

Screenshots

before:
Screen Shot 2024-04-23 at 1 14 39 PM

after:
Screen Shot 2024-04-23 at 1 13 35 PM

@jean-the-coder jean-the-coder marked this pull request as draft April 23, 2024 19:11
@jean-the-coder jean-the-coder marked this pull request as ready for review April 23, 2024 20:13
@AnalogJ
Copy link
Member

AnalogJ commented Apr 26, 2024

Thanks for the PR 🥳
LGTM!

@AnalogJ AnalogJ merged commit d280e93 into fastenhealth:main Apr 26, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants