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

@ -959,4 +959,4 @@ let ctrlIds = -1;
const DISABLE_APP_MINIMUM_DURATION = 64;
const ACTIVE_TRANSITION_MAX_TIME = 5000;
const ACTIVE_TRANSITION_OFFSET = 200;
const ACTIVE_TRANSITION_OFFSET = 200;

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