add undefined check for _dynamicTabHeaderEndpoint

_dynamicTabHeaderEndpoint is set after plugins are installed
_handleFileTabChange is triggered in initialization

Change-Id: I7c47ab1511efe4e5af5afd1eaae06bcf4c9eb8bd
This commit is contained in:
Dhruv Srivastava
2020-03-04 09:53:11 +01:00
parent b7fade824e
commit a8044a8905

View File

@@ -539,7 +539,7 @@
this._currentTabName = tabs[selectedIndex] &&
tabs[selectedIndex].dataset.name;
const source = e && e.type ? e.type : '';
const pluginIndex = this._dynamicTabHeaderEndpoints.indexOf(
const pluginIndex = (this._dynamicTabHeaderEndpoints || []).indexOf(
this._currentTabName);
if (pluginIndex !== -1) {
this._selectedTabPluginEndpoint = this._dynamicTabContentEndpoints[