feat(events): handler argument is optional in unsubscribe()

fixes #8235
This commit is contained in:
Manu Mtz.-Almeida
2016-10-01 01:07:00 +02:00
parent 607ceeff4b
commit 8878e70227
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ export class Events {
*
* @return true if a handler was removed
*/
unsubscribe(topic: string, handler: Function) {
unsubscribe(topic: string, handler: Function = null) {
let t = this._channels[topic];
if (!t) {
// Wasn't found, wasn't removed