From e0631b23af3be1fce63d029ec120cce0914a9f6d Mon Sep 17 00:00:00 2001 From: Dailer Date: Tue, 26 Apr 2022 16:55:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20=E6=9B=B4=E6=96=B0=E4=B8=80?= =?UTF-8?q?=E4=B8=8BBI.broadcasts.remove=20=E7=9A=84=E5=86=99=E6=B3=95.=20?= =?UTF-8?q?=E5=9B=A0=E4=B8=BAon=E6=96=B9=E6=B3=95return=E4=BA=86=E4=B8=80?= =?UTF-8?q?=E4=B8=AAremove=E6=96=B9=E6=B3=95.=20=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=8A=8Afn=E4=BD=9C=E4=B8=BApredicate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/controller/controller.broadcast.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/controller/controller.broadcast.js b/src/core/controller/controller.broadcast.js index d424d0a68..71d7330c7 100644 --- a/src/core/controller/controller.broadcast.js +++ b/src/core/controller/controller.broadcast.js @@ -30,7 +30,9 @@ BI.BroadcastController = BI.inherit(BI.Controller, { remove: function (name, fn) { var self = this; if (fn) { - BI.remove(this._broadcasts[name], fn); + BI.remove(this._broadcasts[name], function (index, cb) { + return fn === cb; + }); if (this._broadcasts[name].length === 0) { delete this._broadcasts[name]; }