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(preload): reject promise axe.utils.preload when XHR fails #2009

Merged
merged 6 commits into from Feb 3, 2020

Conversation

jeeyyy
Copy link
Contributor

@jeeyyy jeeyyy commented Feb 3, 2020

Preload assets did not reject with axios.get failed.
This meant that before this fix, axe.run waited till preload timeout kicked in.

Closes issue:

  • NA

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@jeeyyy jeeyyy requested a review from a team as a code owner February 3, 2020 17:57
@jeeyyy jeeyyy added the fix Bug fixes label Feb 3, 2020
straker
straker previously approved these changes Feb 3, 2020
@@ -66,7 +66,7 @@ axe.utils.getPreloadConfig = function getPreloadConfig(options) {
if (
options.preload.timeout &&
typeof options.preload.timeout === 'number' &&
!Number.isNaN(options.preload.timeout)
!isNaN(options.preload.timeout)
Copy link
Contributor

@straker straker Feb 3, 2020

Choose a reason for hiding this comment

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

Number.isNaN does not exist in IE11, and was causing the timeout test to fail, but not because of the timeout (this was only discovered when we added looking at the error message in the test)

@straker straker merged commit b406b1f into develop Feb 3, 2020
@straker straker deleted the reject-preload-fn branch February 3, 2020 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants