Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
fix: prevent "not found" in querySelector
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Jan 2, 2024
1 parent 3ef76a4 commit 5a02ac0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/url_exist.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ function checkIfInternalLinksExists(ref, title, url, history) {
}

let history = [];
const ht = document.querySelectorAll("a:not(img)");
const ht = document.querySelectorAll(
"article a:not(img, .headerlink)"
);
for (const anchor of ht) {
if (
!anchor.getElementsByTagName("img").length > 0 &&
Expand Down

0 comments on commit 5a02ac0

Please sign in to comment.