Merge pull request #20934 from GuiLeme/data-channel-quick-fix
fix: fix useDataChannel subscribe events
This commit is contained in:
commit
a56ebfb2c8
@ -37,7 +37,6 @@ export const DataChannelItemManager: React.ElementType<DataChannelItemManagerPro
|
||||
pluginName,
|
||||
channelName,
|
||||
pluginApi,
|
||||
dataChannelTypes,
|
||||
subChannelName,
|
||||
dataChannelIdentifier,
|
||||
}}
|
||||
|
@ -38,7 +38,7 @@ const PluginDataChannelManager: React.ElementType<PluginDataChannelManagerProps>
|
||||
let newArrayTypes: DataChannelTypes[] = previousMap.get(uniqueId)?.types || [];
|
||||
if (deltaSubscribe < 0) {
|
||||
const index = newArrayTypes.indexOf(dataChannelType);
|
||||
if (index > -1) {
|
||||
if (index > 0) {
|
||||
newArrayTypes.splice(index, 1);
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user