mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +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
|
* @return true if a handler was removed
|
||||||
*/
|
*/
|
||||||
unsubscribe(topic: string, handler: Function) {
|
unsubscribe(topic: string, handler: Function = null) {
|
||||||
let t = this._channels[topic];
|
let t = this._channels[topic];
|
||||||
if (!t) {
|
if (!t) {
|
||||||
// Wasn't found, wasn't removed
|
// Wasn't found, wasn't removed
|
||||||
|
Reference in New Issue
Block a user