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

autoBind re-binds already bound functions #538

Closed
robagar opened this issue Sep 20, 2019 · 1 comment · Fixed by #539
Closed

autoBind re-binds already bound functions #538

robagar opened this issue Sep 20, 2019 · 1 comment · Fixed by #539

Comments

@robagar
Copy link

robagar commented Sep 20, 2019

Bug

It seems that each time a widget is rendered and autoBind is called, it binds all functions including those that have already been bound.

Package Version: 6.0.0

image

@robagar robagar closed this as completed Sep 20, 2019
@robagar
Copy link
Author

robagar commented Sep 23, 2019

Reopening because it does seem to be real - in WidgetBase.set_properties is this code

    if (this._initialProperties) {
      autoBind(this);
    }

    if (this._initialProperties === false || registeredDiffPropertyNames.length !== 0) {
      ...
    } else {
      this._initialProperties = false;
    }

so if registeredDiffPropertyNames is not empty _initialProperties is never set to false

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 a pull request may close this issue.

1 participant