Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

fix for usage of baseURI which doesn't work in IE11 #1562

Merged
merged 5 commits into from Sep 25, 2020

Conversation

antony
Copy link
Member

@antony antony commented Sep 24, 2020

document.baseURI doesn't exist in IE and causes errors. This attempts to get it and then falls back to looking at the base tag if present.

Fixes #1561 and #1034 as well as an issue where prefetch would also fail in IE as it also depends on baseURI.

Opening in draft because:

  • I've not tested it, I will do tomorrow.
  • I haven't written any tests for the helper(s)

Before submitting the PR, please make sure you do the following

  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@antony
Copy link
Member Author

antony commented Sep 25, 2020

Added unit tests (this is the first time I've used typescript, so feel free to suggest a refactor)

@antony antony marked this pull request as ready for review September 25, 2020 08:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

document.baseURI is undefined in IE11
3 participants