PLT-2030 fixing error handling
Этот коммит содержится в:
@@ -38,25 +38,9 @@ export default class ErrorBar extends React.Component {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s.connErrorCount && s.connErrorCount >= 1 && s.connErrorCount < 7) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
isConnectionError(s) {
|
||||
if (!s.connErrorCount || s.connErrorCount === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s.connErrorCount > 7) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
if (global.window.mm_config.SendEmailNotifications === 'false') {
|
||||
ErrorStore.storeLastError({message: this.props.intl.formatMessage(messages.preview)});
|
||||
|
||||
@@ -59,9 +59,9 @@ export default class Textbox extends React.Component {
|
||||
}
|
||||
|
||||
onRecievedError() {
|
||||
const errorState = ErrorStore.getLastError();
|
||||
const errorCount = ErrorStore.getConnectionErrorCount();
|
||||
|
||||
if (errorState && errorState.connErrorCount > 0) {
|
||||
if (errorCount > 0) {
|
||||
this.setState({connection: 'bad-connection'});
|
||||
} else {
|
||||
this.setState({connection: ''});
|
||||
|
||||
Ссылка в новой задаче
Block a user