fix: remove use of jquery $(this) in ajaxify

This commit is contained in:
Julian Lam
2024-09-11 10:22:34 -04:00
parent d42d3b1c39
commit 176f4d0d09

View File

@@ -527,8 +527,7 @@ $(document).ready(function () {
return; return;
} }
const $this = $(this); const href = this.pathname;
const href = $this.attr('href');
const internalLink = utils.isInternalURI(this, window.location, config.relative_path); const internalLink = utils.isInternalURI(this, window.location, config.relative_path);
const rootAndPath = new RegExp(`^${rootUrl}${config.relative_path}/?`); const rootAndPath = new RegExp(`^${rootUrl}${config.relative_path}/?`);
@@ -561,7 +560,7 @@ $(document).ready(function () {
} }
}; };
if ($this.attr('data-ajaxify') === 'false') { if (this.getAttribute('data-ajaxify') === 'false') {
if (!internalLink) { if (!internalLink) {
return; return;
} }