Skip to content

Conversation

@justphil
Copy link

Add a rejection handler (angular.noop) in the duSmoothScroll directive in order to prevent "Possibly unhandled rejection" errors with AngularJS >= 1.6 in case the user cancels the scroll animation.

Steps to reproduce:

  1. Open this plunker.
  2. Double click the links which trigger animated scrolling (Section 1, 2, 3)
  3. The second click will always cancel the animated scrolling if you're fast enough.
  4. Check the browser console to see the "Possibly unhandled rejection" errors.

Some more details regarding unhandled promise rejections can be found in this blog post.

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.

1 participant