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

Move from $.proxy to es6 arrow functions. #21049

Merged
merged 1 commit into from
Nov 1, 2016
Merged

Move from $.proxy to es6 arrow functions. #21049

merged 1 commit into from
Nov 1, 2016

Conversation

bardiharborow
Copy link
Member

Fixes #20633.

@@ -161,7 +161,7 @@ const Carousel = (($) => {

if (this._config.interval && !this._isPaused) {
this._interval = setInterval(
$.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval
(document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval
Copy link
Member Author

@bardiharborow bardiharborow Oct 31, 2016

Choose a reason for hiding this comment

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

The other way to do this is document.visibilityState ? () => this.nextWhenVisible() : () => this.next(), but that seemed cringeworthy.

@mdo mdo added this to the v4.0.0-alpha.6 milestone Oct 31, 2016
@mdo mdo merged commit 0974267 into twbs:v4-dev Nov 1, 2016
@mdo mdo mentioned this pull request Nov 1, 2016
@bardiharborow bardiharborow deleted the arrow-functions branch November 1, 2016 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants