BigW Consortium Gitlab

fixed breadcrumbs being undefined

parent dae629e5
...@@ -8,6 +8,8 @@ export const addTooltipToEl = (el) => { ...@@ -8,6 +8,8 @@ export const addTooltipToEl = (el) => {
export default () => { export default () => {
const breadcrumbs = document.querySelector('.breadcrumbs-list'); const breadcrumbs = document.querySelector('.breadcrumbs-list');
if (breadcrumbs) {
const topLevelLinks = breadcrumbs.querySelectorAll('.breadcrumbs-list > li > a'); const topLevelLinks = breadcrumbs.querySelectorAll('.breadcrumbs-list > li > a');
const $expander = $('.js-breadcrumbs-collapsed-expander'); const $expander = $('.js-breadcrumbs-collapsed-expander');
...@@ -18,4 +20,5 @@ export default () => { ...@@ -18,4 +20,5 @@ export default () => {
$('.js-breadcrumbs-collapsed-expander', e.currentTarget).toggleClass('open') $('.js-breadcrumbs-collapsed-expander', e.currentTarget).toggleClass('open')
.tooltip('hide'); .tooltip('hide');
}); });
}
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment