summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:09:05 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 18:09:05 +0000
commitc2367afbf57ebc65d5b78a743b5d6a91f0aece9f (patch)
tree165c2c54bf72ab3a3a9417d97f63ece5c9eba9f5 /app/assets/javascripts/pipelines
parent51a9512965d86e3094968fa514e4ae8a96d38cf3 (diff)
downloadgitlab-ce-c2367afbf57ebc65d5b78a743b5d6a91f0aece9f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines')
-rw-r--r--app/assets/javascripts/pipelines/pipeline_details_bundle.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_details_bundle.js b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
index d9192d3d76b..ffcb0f24cc6 100644
--- a/app/assets/javascripts/pipelines/pipeline_details_bundle.js
+++ b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
@@ -95,14 +95,14 @@ export default () => {
},
});
+ const tabsElement = document.querySelector('.pipelines-tabs');
const testReportsEnabled =
window.gon && window.gon.features && window.gon.features.junitPipelineView;
- if (testReportsEnabled) {
+ if (tabsElement && testReportsEnabled) {
const fetchReportsAction = 'fetchReports';
testReportsStore.dispatch('setEndpoint', dataset.testReportEndpoint);
- const tabsElmement = document.querySelector('.pipelines-tabs');
const isTestTabActive = Boolean(
document.querySelector('.pipelines-tabs > li > a.test-tab.active'),
);
@@ -113,11 +113,11 @@ export default () => {
const tabClickHandler = e => {
if (e.target.className === 'test-tab') {
testReportsStore.dispatch(fetchReportsAction);
- tabsElmement.removeEventListener('click', tabClickHandler);
+ tabsElement.removeEventListener('click', tabClickHandler);
}
};
- tabsElmement.addEventListener('click', tabClickHandler);
+ tabsElement.addEventListener('click', tabClickHandler);
}
// eslint-disable-next-line no-new