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

fix(MessageEmbed): set footer to undefined #7358

Merged
merged 1 commit into from Feb 13, 2022
Merged

fix(MessageEmbed): set footer to undefined #7358

merged 1 commit into from Feb 13, 2022

Conversation

imranbarbhuiya
Copy link
Contributor

@imranbarbhuiya imranbarbhuiya commented Jan 28, 2022

Please describe the changes this PR makes and why it should be merged:
If you set embed.setFooter(null) it set's footer to {}. When checking MessageEmbed.length, it checks this.footer?.text.length. In this case, footer is defined but footer.text isn't, so it'll throw an error can't read property of undefined (reading length).

In builder, it's correct, that's why after discussing in library-discussion I'm sending the pr in stable branch.
Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

@kyranet
Copy link
Member

kyranet commented Jan 28, 2022

We do not accept PRs to stable anymore, it causes main to need a rebase and with that, all PRs with it.

@imranbarbhuiya
Copy link
Contributor Author

We do not accept PRs to stable anymore, it causes main to need a rebase and with that, all PRs with it.

This bug isn't present is builder, that's why it's not present in main branch too.

So where should I change it? I think this change is needed because after v14 release some people will still use v13.

@imranbarbhuiya imranbarbhuiya changed the base branch from stable to v13 February 9, 2022 08:53
@imranbarbhuiya
Copy link
Contributor Author

After #7431 ig this can be added in v13

@iCrawl iCrawl merged commit bc5ddc3 into discordjs:v13 Feb 13, 2022
@RedGuy12 RedGuy12 mentioned this pull request Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants