Only update selected if different from current
This commit is contained in:
parent
281c3ef4d6
commit
2bc2fb14f6
@ -64,9 +64,11 @@ export class App extends React.Component<AppProps, AppState> {
|
||||
}
|
||||
|
||||
updateSelect(selected: string): void {
|
||||
this.setState((state) => {
|
||||
return { streamList: state.streamList, selectedStream: selected }
|
||||
})
|
||||
if (selected !== this.state.selectedStream) {
|
||||
this.setState((state) => {
|
||||
return { streamList: state.streamList, selectedStream: selected }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user