diff --git a/src/webui/src/components/Header/index.js b/src/webui/src/components/Header/index.js index 7198cb3df..1c1884d46 100644 --- a/src/webui/src/components/Header/index.js +++ b/src/webui/src/components/Header/index.js @@ -31,9 +31,9 @@ export default class Header extends React.Component { } toggleLoginModal() { - this.setState({ - showLogin: !this.state.showLogin - }); + this.setState((prevState) => ({ + showLogin: !prevState.showLogin + })); this.setState({loginError: null}); }