diff --git a/index-ca-en.html b/index-ca-en.html index 1fd8c262..493c367e 100644 --- a/index-ca-en.html +++ b/index-ca-en.html @@ -69,6 +69,13 @@ document.addEventListener('Storylines-Loaded', (payload) => { const breadcrumbs = payload.detail.config.breadcrumbs ?? []; // default to an empty array if this property isn't defined. const breadcrumbList = document.querySelectorAll('#wb-bc > .container > .breadcrumb')[0]; + const firstElement = breadcrumbList.children[0]; // should be the `Canada.ca` breadcrumb. + + // Reset the breadcrumb list. + breadcrumbList.innerHTML = ``; + + // Add the `Canada.ca` element back to the list of breadcrumbs. + breadcrumbList.appendChild(firstElement); // Create an HTML li element for each of the breadcrumbs to add and then append them to the breadcrumb list. breadcrumbs.forEach((b) => { diff --git a/index-ca-fr.html b/index-ca-fr.html index 11becfd1..ee72656c 100644 --- a/index-ca-fr.html +++ b/index-ca-fr.html @@ -67,8 +67,15 @@ }); document.addEventListener('Storylines-Loaded', (payload) => { - const breadcrumbs = payload.detail.config.breadcrumbs; + const breadcrumbs = payload.detail.config.breadcrumbs ?? []; // default to an empty array if this property isn't defined. const breadcrumbList = document.querySelectorAll('#wb-bc > .container > .breadcrumb')[0]; + const firstElement = breadcrumbList.children[0]; // should be the `Canada.ca` breadcrumb. + + // Reset the breadcrumb list. + breadcrumbList.innerHTML = ``; + + // Add the `Canada.ca` element back to the list of breadcrumbs. + breadcrumbList.appendChild(firstElement); // Create an HTML li element for each of the breadcrumbs to add and then append them to the breadcrumb list. breadcrumbs.forEach((b) => {