From 8878e70227c383c61a9cee6e92d2e9521c298d45 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Sat, 1 Oct 2016 01:07:00 +0200 Subject: [PATCH] feat(events): handler argument is optional in unsubscribe() fixes #8235 --- src/navigation/nav-controller-base.ts | 2 +- src/util/events.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/navigation/nav-controller-base.ts b/src/navigation/nav-controller-base.ts index bd5ff1a7ec6..493876f0620 100644 --- a/src/navigation/nav-controller-base.ts +++ b/src/navigation/nav-controller-base.ts @@ -959,4 +959,4 @@ let ctrlIds = -1; const DISABLE_APP_MINIMUM_DURATION = 64; const ACTIVE_TRANSITION_MAX_TIME = 5000; -const ACTIVE_TRANSITION_OFFSET = 200; \ No newline at end of file +const ACTIVE_TRANSITION_OFFSET = 200; diff --git a/src/util/events.ts b/src/util/events.ts index f0098bcd557..72f5f06bf99 100644 --- a/src/util/events.ts +++ b/src/util/events.ts @@ -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