mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
feat(events): handler argument is optional in unsubscribe()
fixes #8235
This commit is contained in:
@ -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;
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user