Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ID detection #5464

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
benmcgarry committed Apr 11, 2023
commit 51e8126e2a2d337a0e69cbfae114c7f92460a4b5
2 changes: 1 addition & 1 deletion lib/utils/watchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function registerThing(element: HTMLElement) {
// Loading additional things ("load more comments", neverEndingReddit) may cause repeating posts; remove those
const id = thing.getFullname();
// Some posts may not have a have an id, e.g. those that are deleted or placeholders
if (/^t[0-9]_[a-zA-Z0-9]+$/.test(id)) { // match ids with regex.
if (/^t[0-9]_[a-zA-Z0-9]+$/.test(id)) { // match ids with regex.
const existing = dupeSet.get(id);
if (existing === element) return; // `registerThing` is being run on an already added thing
if (existing && document.contains(existing)) {
Expand Down