fix: #10939 修复 broadcast 事件无效

This commit is contained in:
Jeremy Pang 2024-09-25 23:12:57 +08:00
parent d19c7af137
commit df5300e6e5

View File

@ -238,7 +238,8 @@ export class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
if (ref) { if (ref) {
// 这里无法区分监听的是不是广播所以又bind一下主要是为了绑广播 // 这里无法区分监听的是不是广播所以又bind一下主要是为了绑广播
this.unbindEvent = bindEvent(this.ref); this.unbindEvent?.();
this.unbindEvent = bindEvent(ref);
} }
this.cRef = ref; this.cRef = ref;
} }