[MM-62781] Wait for nonce before requesting info that will update the server dropdown component (#3320)

This commit is contained in:
Devin Binnie
2025-02-12 09:27:44 -05:00
committed by GitHub
parent d8ff162494
commit face4096f1

View File

@@ -139,11 +139,12 @@ class ServerDropdown extends React.PureComponent<Record<string, never>, State> {
};
componentDidMount() {
window.desktop.serverDropdown.requestInfo();
window.addEventListener('click', this.closeMenu);
window.addEventListener('keydown', this.handleKeyboardShortcuts);
window.desktop.getNonce().then((nonce) => {
this.setState({nonce});
this.setState({nonce}, () => {
window.desktop.serverDropdown.requestInfo();
});
});
}