-
Notifications
You must be signed in to change notification settings - Fork 641
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
tryReference and isValidReference #1087
Conversation
This also allows people to write reactions that will auto-purge invalid refs in an easier way
Also, since that's such a common pattern it makes me wonder if there should be a |
@k-g-a @mweststrate thoughts? |
In my opinion this use case is indeed worth a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as it saves some boilerplae. For now we are using almost same checks in our codebase.
|
@k-g-a that's right, with |
Moved the discussion for |
Basically lately there have been lots of issues about references failing when they were accessed and the referenced node was no longer available, so these two methods give an easier way to use them in those cases.
tryReference
isValidReference