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:
@ -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