Skip to content

Make L.Handler.enable/disable return this#4708

Merged
IvanSanchez merged 1 commit intomasterfrom
handler-return-this
Jul 5, 2016
Merged

Make L.Handler.enable/disable return this#4708
IvanSanchez merged 1 commit intomasterfrom
handler-return-this

Conversation

@yohanboniface
Copy link
Copy Markdown
Member

Those are methods used very often, this can save us a lot of
useless lines.

this.handling.enable().doSomething();

instead of

this.handling.enable()
this.handling.doSomething()

Just like we have for addTo and such.

@IvanSanchez
Copy link
Copy Markdown
Member

@yohanboniface Docstrings should reflect the return value too.

@yohanboniface yohanboniface force-pushed the handler-return-this branch from fd35680 to 64a1ee6 Compare July 5, 2016 08:18
Those are methods used very often, this can save us a lot of
useless lines.
@yohanboniface
Copy link
Copy Markdown
Member Author

Good catch :)
Fixed!

@IvanSanchez IvanSanchez merged commit c263f2d into master Jul 5, 2016
@yohanboniface yohanboniface deleted the handler-return-this branch August 8, 2016 10:43
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.

2 participants