[MM-46857] Remove misleading console error about tab status when servers don't exist (#2260)

This commit is contained in:
Devin Binnie 2022-09-21 08:53:43 -04:00 committed by GitHub
parent 90123896b8
commit 7c3b68fb68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -5,7 +5,6 @@
'use strict';
const fs = require('fs');
const path = require('path');
const {SHOW_SETTINGS_WINDOW} = require('../../src/common/communication');

View file

@ -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;
}