Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-07-06 19:24:03 +0300
committerPhil Hughes <me@iamphill.com>2017-07-06 19:24:03 +0300
commitc85df8105e3b8982ecf6a16f8ae9f3af2f130030 (patch)
tree099acdacb9e622db8780c520faff649e2a6cf27d /app/assets/javascripts/group_name.js
parent6d3a9cc98e1503b0ef49906833aab094a8e6b686 (diff)
improvements to breadcrumb titles, links & nesting
Diffstat (limited to 'app/assets/javascripts/group_name.js')
-rw-r--r--app/assets/javascripts/group_name.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/assets/javascripts/group_name.js b/app/assets/javascripts/group_name.js
index 37c6765d942..3e483b69fd2 100644
--- a/app/assets/javascripts/group_name.js
+++ b/app/assets/javascripts/group_name.js
@@ -5,12 +5,15 @@ export default class GroupName {
constructor() {
this.titleContainer = document.querySelector('.js-title-container');
this.title = this.titleContainer.querySelector('.title');
- this.titleWidth = this.title.offsetWidth;
- this.groupTitle = this.titleContainer.querySelector('.group-title');
- this.groups = this.titleContainer.querySelectorAll('.group-path');
- this.toggle = null;
- this.isHidden = false;
- this.init();
+
+ if (this.title) {
+ this.titleWidth = this.title.offsetWidth;
+ this.groupTitle = this.titleContainer.querySelector('.group-title');
+ this.groups = this.titleContainer.querySelectorAll('.group-path');
+ this.toggle = null;
+ this.isHidden = false;
+ this.init();
+ }
}
init() {