Browse Source

Pull request #3762: BI-155367 fix: 兜底处理一下,避免在事件回调里同步移除回调,导致后续遍历执行报错

Merge in VISUAL/fineui from ~OLIVER.KE/fineui:master to master

* commit '0664def54e151515b4da5e57e3675338a2544272':
  BI-155367 fix: 兜底处理一下,避免执行事件回调的时候同步移除回调,导致后续遍历执行报错
master
Oliver.Ke-柯键基 1 month ago
parent
commit
2ca1c7bca0
  1. 2
      packages/fineui/src/core/controller/controller.broadcast.js

2
packages/fineui/src/core/controller/controller.broadcast.js

@ -22,7 +22,7 @@ export class BroadcastController extends Controller {
send(name) { send(name) {
const args = [].slice.call(arguments, 1); const args = [].slice.call(arguments, 1);
each(this._broadcasts[name], (i, fn) => fn(...args)); each(this._broadcasts[name]?.slice?.(), (i, fn) => fn(...args));
} }
remove(name, fn) { remove(name, fn) {

Loading…
Cancel
Save