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

Fix ObservableComponent::useEvent ignoring seed #135

Merged
merged 2 commits into from
Dec 12, 2018
Merged

Fix ObservableComponent::useEvent ignoring seed #135

merged 2 commits into from
Dec 12, 2018

Commits on Dec 12, 2018

  1. Fix ObservableComponent::useEvent ignoring seed

    ObservableComponent::useEvent checked whether
    more than one argument was supplied (correct), but
    used the 3rd argument as a seed value instead.
    That argument is always undefined when using
    Refract according to the docs.
    
    This bug was introduced with commit d24f0f0.
    
    This commit changes the function signature back
    to the original one of using 2 args, one being
    optional. The check for the actual argument count
    is then done using the arguments object.
    Nimelrian committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    709258b View commit details
    Browse the repository at this point in the history
  2. Make useEvent a regular function

    The arguments object cannot be used in arrow
    functions. useEvent doesn't have to be an arrow
    function, so we define it as a regular function
    instead.
    Nimelrian committed Dec 12, 2018
    Configuration menu
    Copy the full SHA
    3e6eb37 View commit details
    Browse the repository at this point in the history