[MM-46857] Remove misleading console error about tab status when servers don't exist (#2260)
This commit is contained in:
parent
90123896b8
commit
7c3b68fb68
|
@ -5,7 +5,6 @@
|
|||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const {SHOW_SETTINGS_WINDOW} = require('../../src/common/communication');
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
/* eslint-disable max-lines */
|
||||
|
||||
import classNames from 'classnames';
|
||||
import React, {Fragment} from 'react';
|
||||
import {Container, Row} from 'react-bootstrap';
|
||||
|
@ -553,13 +555,14 @@ class MainPage extends React.PureComponent<Props, State> {
|
|||
);
|
||||
|
||||
const views = () => {
|
||||
if (!this.props.teams.length) {
|
||||
return null;
|
||||
}
|
||||
let component;
|
||||
const tabStatus = this.getTabViewStatus();
|
||||
if (!tabStatus) {
|
||||
if (this.state.activeTabName) {
|
||||
if (this.state.activeTabName || this.state.activeServerName) {
|
||||
console.error(`Not tabStatus for ${this.state.activeTabName}`);
|
||||
} else {
|
||||
console.error('No tab status, tab doesn\'t exist anymore');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue