Skip to content

Conversation

@mookums
Copy link
Contributor

@mookums mookums commented Jul 23, 2025

This allows for repeated registering of a listener. This fixes old.reddit.com and allow for both the body and the comments to be properly fetched.

// remove any existing listener, so it should be impossible to get null
// from this function call.
const eh = (try EventHandler.register(alloc, target, typ, listener, null)) orelse unreachable;
const eh = (try EventHandler.register(alloc, target, typ, listener, null)) orelse return null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we understand how this is happening? I tend to agree with the comment. This is only called from a set_xyz and all the set_xyz should unregister the existing callback, so how is EventHandler.register returning null?

@mookums mookums closed this Jul 23, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants