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

Delegate enhancement #57

Closed

Conversation

simeydotme
Copy link
Collaborator

In response to #56 I've refactored the .on() method to handle null/undefined delegates.
The commit messages have specific detailas about the changes, and the tests have been updated to reflect.

If the `delegate` option is null|undefined, then `.on()` will ignore the
`delegate` option and run the `callback` option on the node from which it
was triggered.

- Added tests.
- Fixes fabiospampinato#56
Also in the tests lets make sure it's chainable. This should probably be
propagated to all other tests to make sure each method is returning an
instnace of cash() or not depending on the API.
shshaw added a commit to shshaw/cash that referenced this pull request Mar 4, 2016
- Fix for issue fabiospampinato#57 with `null` delegates
- Object can be passed as the first parameter for `on` to register
multiple events at once
- Better `ready` handling.
- Don’t re-set node id if already set, and save cash node reference for
better performance
@shshaw shshaw mentioned this pull request Mar 4, 2016
@shshaw shshaw mentioned this pull request Apr 12, 2016
@shshaw
Copy link
Collaborator

shshaw commented Apr 12, 2016

A similar fix was implemented as of version 1.1.0. Thanks!

@shshaw shshaw closed this Apr 12, 2016
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.

None yet

2 participants