diff --git a/src/widgets/vc-panel.jsx b/src/widgets/vc-panel.jsx index b8c99978..154930d5 100644 --- a/src/widgets/vc-panel.jsx +++ b/src/widgets/vc-panel.jsx @@ -77,7 +77,9 @@ class VCPanel extends React.PureComponent { componentWillUnmount() { const topic = this.props.tinode.getTopic(this.props.topic); - topic.onInfo = this.previousOnInfo; + if (topic) { + topic.onInfo = this.previousOnInfo; + } this.stop(); } @@ -358,58 +360,54 @@ class VCPanel extends React.PureComponent { const remoteActive = this.remoteRef.current && (this.remoteRef.current.src || this.remoteRef.current.srcObject) return ( - <> -
- {!this.isBroadcast && Object.keys(this.state.participants).length > 0 ? - : - null - } -
- {isPublishing ? -
-