assets/js/alerts/contentHashLink.js in kcc-gem-theme-2.5.3 vs assets/js/alerts/contentHashLink.js in kcc-gem-theme-2.6.0
- old
+ new
@@ -67,15 +67,15 @@
.on('shown.bs.collapse', () => { // Bootstrap 4 Collapse method // Must be defined before the collapse is activated
window.location.search ?
checkForQuery(window.location.search.replace(queryStartRegex, ''), hash)
: null; })
.collapse('show'); // Bootstrap 4 Collapse method
- findContentTarget(hash);
+ findContentTarget(`button[data-target="${hash}"]`);
}
}
-function checkForHash(e) {
+function checkForHash() {
if (window.location.hash) {
let hash = window.location.hash.replace(endingSlashRegex, '');
checkForMatchingTabOrAccordion(hash);
}
@@ -90,8 +90,12 @@
function contentHashLink() {
if (!document.querySelector('#accordion') && !document.querySelector('.nav.nav-tabs'))
return;
initContentHashLink();
+
+ import(/* webpackChunkName: 'addAccordionOrTabHistoryStates' */ './addAccordionOrTabHistoryStates').then(({ default: addAccordionOrTabHistoryStates }) => {
+ addAccordionOrTabHistoryStates();
+ });
}
export default contentHashLink;
\ No newline at end of file