fix: Unable to change language while loading system signature in some case.

This commit is contained in:
Quentin Decaunes 2020-03-19 16:13:48 +01:00
parent df2d7d6357
commit 347b05bad7

View File

@ -84,16 +84,17 @@ class App extends React.Component<{}, AppState> {
.then((data: SysInfoState) => {
data.signature = createMachineSignature(data);
data.permissiveSignature = createPermissiveMachineSignature(data);
this._isMounted && this.setState({ sysinfo: data });
if (this._isMounted) this.setState({ sysinfo: data });
})
.catch((error: string) => {
this._isMounted &&
if (this._isMounted) {
this.setState({
sysinfo: {
...this.state.sysinfo,
error: error,
},
});
}
});
checkNewVersion();