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

Adding script error handler to prevent Angular initialization process getting stuck #4

Merged
merged 1 commit into from
Dec 11, 2019

Conversation

EricTendian
Copy link
Contributor

With some ad blockers, it is possible for the Pendo script to be blocked. Right now, as this is hooking into the APP_INITIALIZER for Angular, the promise must resolve or be rejected before the rest of the app loads.

If the script fails to load, then the onerror function will be triggered, rejecting the promise, and allowing the rest of the app to load. This does not handle the issue of a very slow internet connection (where the app is hanging until the script can finish downloading), but it's a start.

This will fix #3 - it is the solution I'm using now to deal with the issue (as my site can have users with adblock).

@yociduo yociduo merged commit 685db4d into yociduo:master Dec 11, 2019
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.

App is getting blocked
2 participants