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

Reject browser js loader promise with Error object #7236

Merged
merged 9 commits into from Nov 23, 2021

Conversation

mrkldshv
Copy link
Contributor

@mrkldshv mrkldshv commented Nov 1, 2021

↪️ Pull Request

If loading of JS in the browser fails, reject promise of JS loader with Error object with message instead of DOM Error event.
Fixes #6052.

🚨 Test instructions

Fake JS loader fail to get rejected promise and checked printed out error.

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@height
Copy link

height bot commented Nov 1, 2021

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@mischnic
Copy link
Member

mischnic commented Nov 9, 2021

Ci is failing because you need to reformat the file with Prettier.

@mrkldshv
Copy link
Contributor Author

mrkldshv commented Nov 9, 2021

@mischnic Formatting should be fixed now

@devongovett devongovett merged commit 8cabeae into parcel-bundler:v2 Nov 23, 2021
@mrkldshv mrkldshv deleted the fix/js-loader-error-object branch November 23, 2021 21:46
@mrkldshv
Copy link
Contributor Author

Thank you for review!

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.

JSRuntime: browser js loader rejects with an error Event, not an Error
3 participants