Skip to content

Issue with window.location.pathname #52

@timminss

Description

@timminss

Thanks for the fantastic library! I came across an issue with it, and hopefully the below provides a solution too:

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

When using queryParams in an Angular project, window.location.pathname is not sufficient to determine the URL. SVGs appear black in Safari as a result.

Expected behavior

SVGs should display as normal in Safari, even when using queryParams.

Minimal reproduction of the problem with instructions

A new Angular project, with content-loader installed, and a single route. Add a queryParameter to the end of the URL, and the SVG will no longer load.

What is the motivation / use case for changing the behavior?

Fix a bug

Environment


Angular version: Any

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [x] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
Others:
The following fork includes a commit which appears to fix this issue:

https://github.com/timminss/content-loader

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions