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 null renderMarkdown and add tests #2724

Merged
merged 1 commit into from
Dec 12, 2019
Merged

Conversation

compulim
Copy link
Contributor

Fixes #2723.

Changelog Entry

Fixes

  • Fixes #2723. Fix renderMarkdown should not be called if it is undefined in minimal bundle, by @compulim in PR #2724

Description

useRenderMarkdownAsHTML hook should not call renderMarkdown if it is undefined. We should return the callback as null/undefined/falsy. So the caller know renderMarkdown is not available and render the text as-is.

Specific Changes

  • Modify useRenderMarkdownAsHTML to return falsy if renderMarkdown is falsy

  • Testing Added

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 61.121% when pulling b95ebe4 on compulim:fix-2723 into 7d67f26 on microsoft:master.

Copy link
Contributor

@tdurnford tdurnford left a comment

Choose a reason for hiding this comment

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

lgtm

@compulim compulim merged commit 7811093 into microsoft:master Dec 12, 2019
@compulim compulim deleted the fix-2723 branch December 12, 2019 22:47
@compulim compulim mentioned this pull request Dec 13, 2019
73 tasks
@corinagum corinagum mentioned this pull request Dec 13, 2019
73 tasks
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.

Minimal bundle error when rendering text because renderMarkdown is undefined
4 participants