From 8f9f41efe51d2a4ce450e262d7082696df91ff05 Mon Sep 17 00:00:00 2001 From: or-else Date: Thu, 15 Jun 2023 14:03:04 -0700 Subject: [PATCH] removed unnecessary React component <> --- src/widgets/vc-panel.jsx | 98 ++++++++++++------------ umd/index.dev.js | 159 +++++++++++++++++++-------------------- umd/index.dev.js.map | 2 +- umd/index.prod.js | 2 +- umd/index.prod.js.map | 2 +- 5 files changed, 128 insertions(+), 135 deletions(-) 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 ? -
-