-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(GuildScheduledEvent): handle null recurrence_rule #10543
fix(GuildScheduledEvent): handle null recurrence_rule #10543
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
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.
When the recurrence rule is removed, Discord will send null
. This means the proposed condition change will result in false
where it goes to the else
clause where nothing happens. The cached scheduled event is not updated and will be incorrect.
A proposed fix would be to leave the condition as it is and instead do this:
this.recurrenceRule = data.recurrenceRule && {...};
When null
is received, it will be correctly set to null
.
* fix(GuildScheduledEvent): handle null recurrence_rule * refactor: consistency * feat: implement suggested logic change * fix: correct data.recurrence_rule check --------- Co-authored-by: Almeida <github@almeidx.dev>
Please describe the changes this PR makes and why it should be merged:
This PR handles a null
recurrence_rule
value inGuildScheduledEvent
s. If there is no rule, the value appears to always be null rather than not present.Status and versioning classification: