Skip to content

Commit

Permalink
Patch deprecated defaultValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Lepozepo authored Dec 11, 2022
1 parent 25d651c commit bd4d3b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/react-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ const deprecated = {
* @param {ReactMarkdownOptions} options
* @returns {ReactElement}
*/
export function ReactMarkdown(options) {
export function ReactMarkdown(_options) {
const options = { ..._options, transformLinkUri: _options?.transformLinkUri || uriTransformer };
for (const key in deprecated) {
if (own.call(deprecated, key) && own.call(options, key)) {
const deprecation = deprecated[key]
Expand Down Expand Up @@ -124,8 +125,6 @@ export function ReactMarkdown(options) {
return result
}

ReactMarkdown.defaultProps = {transformLinkUri: uriTransformer}

ReactMarkdown.propTypes = {
// Core options:
children: PropTypes.string,
Expand Down

0 comments on commit bd4d3b5

Please sign in to comment.