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 warning in UrlField when value is nullish and emptyText is empty #6176

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

OoDeLally
Copy link
Contributor

Choosing between

  • displaying a link or a static text,
  • showing the value or the default,
    are two distinct orthogonal decisions.

In my base my value was undefined and I didnt provide an emptyText.
Because of that UrlField tried to create a Link leading to an annoying console warning, because it doesnt like that children is undefined.

In the case the value is null, it is better to display an empty static text than an empty link.

@fzaninotto fzaninotto changed the title UrlField: Removed emptyText existence condition Fix warning in UrlField when value is nullish and emptyText is empty Apr 26, 2021
@fzaninotto fzaninotto merged commit d21b578 into marmelab:master Apr 26, 2021
@fzaninotto
Copy link
Member

Thanks!

@fzaninotto fzaninotto added this to the 3.15 milestone Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants