diff --git a/e2e/specs/settings.test.js b/e2e/specs/settings.test.js index 7915ad54..b5ad7676 100644 --- a/e2e/specs/settings.test.js +++ b/e2e/specs/settings.test.js @@ -5,7 +5,6 @@ 'use strict'; const fs = require('fs'); -const path = require('path'); const {SHOW_SETTINGS_WINDOW} = require('../../src/common/communication'); diff --git a/src/renderer/components/MainPage.tsx b/src/renderer/components/MainPage.tsx index 3ef725e6..a1b16ad6 100644 --- a/src/renderer/components/MainPage.tsx +++ b/src/renderer/components/MainPage.tsx @@ -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 { ); 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; }