Skip to content

Commit

Permalink
fix: missing tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Oct 5, 2024
1 parent bd899c3 commit f964994
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const comment = (() => {

const owns = storage('owns');
const user = storage('user');
const tracker = storage('tracker');
const showHide = storage('comment');

const remove = async (button) => {
Expand Down Expand Up @@ -423,9 +424,9 @@ export const comment = (() => {
};

const fetchTracker = (comment) => {
comment.comments.forEach((c) => {
fetchTracker(c);
});
if (comment.comments) {
comment.comments.forEach(fetchTracker);
}

if (comment.ip === undefined || comment.user_agent === undefined || comment.is_admin || tracker.has(comment.ip)) {
return;
Expand Down

0 comments on commit f964994

Please sign in to comment.