Skip to content

Commit 836b38c

Browse files
fix: [VIDECO-11315] Fix for multiple publishers bug (#878)
1 parent a05be13 commit 836b38c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OTSubscriber.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ export default class OTSubscriber extends Component {
9797
if (error) {
9898
this.otrnEventHandler(error);
9999
} else {
100-
this.setState({
101-
streams: [...this.state.streams, stream.streamId],
102-
});
100+
this.setState(prevState => ({
101+
streams: [...prevState.streams, stream.streamId],
102+
}));
103103
}
104104
});
105105
}

0 commit comments

Comments
 (0)