fix(platform-browser): Get correct base path when using "." as base href when serving from the file:// protocol.#53547
fix(platform-browser): Get correct base path when using "." as base href when serving from the file:// protocol.#53547wartab wants to merge 1 commit intoangular:mainfrom
Conversation
There was a problem hiding this comment.
location.href includes the full URL which I suspect might throw it off. We should use document.baseURI which is guaranteed to be only the root.
There was a problem hiding this comment.
Good call, I wasn't sure if that could cause trouble.
|
@wartab can you squash the commits so the linter doesn't complain? |
c14f0c2 to
ab91a33
Compare
…ref when serving from the file:// protocol. Using http://a as the base URL returns / instead of the actual base path when using the file:// protocol. Using document.baseURI addresses this. Fixes angular#53546
ab91a33 to
5858bf2
Compare
|
@crisbeto Just done it, also changed the commit message to be accurate |
|
This PR was merged into the repository by commit fdb9cb7. |
|
@wartab thanks for the fix! 👍 It'd be great if we can add some tests (as a separate PR) for the |
|
@AndrewKushnir I can try, however that file specifically doesn't seem to be covered for tests at all (I think), so bear with me if I don't get it right right away. |
|
@wartab thanks for looking into that 👍 Let us know if you have any questions, we'll be happy to help. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ref when serving from the file:// protocol. (angular#53547) Using http://a as the base URL returns / instead of the actual base path when using the file:// protocol. Using document.baseURI addresses this. Fixes angular#53546 PR Close angular#53547
…ref when serving from the file:// protocol. (angular#53547) Using http://a as the base URL returns / instead of the actual base path when using the file:// protocol. Using document.baseURI addresses this. Fixes angular#53546 PR Close angular#53547
…ref when serving from the file:// protocol. (angular#53547) Using http://a as the base URL returns / instead of the actual base path when using the file:// protocol. Using document.baseURI addresses this. Fixes angular#53546 PR Close angular#53547
Using http://a as the base URL returns / instead of the actual base path when using the file:// protocol. Using document.baseURI addresses this.
Fixes #53546
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What is the current behavior?
Issue Number: #53546
What is the new behavior?
Does this PR introduce a breaking change?
Other information
I'm not sure how to write a test for this.