Skip to content

Make nodeToHostNode handle arrays#2001

Merged
ljharb merged 2 commits intomasterfrom
mac--html-text-fragment-fixes
Feb 4, 2019
Merged

Make nodeToHostNode handle arrays#2001
ljharb merged 2 commits intomasterfrom
mac--html-text-fragment-fixes

Conversation

@madicap
Copy link
Copy Markdown
Contributor

@madicap madicap commented Feb 4, 2019

In order to resolve Issue #1799 and return expected .text() and .html() results for non-wrapped Fragments, nodeToHostNode in the react adapters needed to be able to handle arrays. This PR does that, changing .text() and .html() to deal with an array of nodes while maintaining backwards compatibility for adapters returning single nodes.

Fixes #1799.

@ljharb ljharb added the semver: minor New stuff. label Feb 4, 2019
@ljharb ljharb merged commit bcb6fa9 into master Feb 4, 2019
@ljharb ljharb deleted the mac--html-text-fragment-fixes branch February 4, 2019 22:42
ljharb added a commit that referenced this pull request Feb 5, 2019
 - [New] Make nodeToHostNode handle arrays (#2001)
 - [Dev Deps] update `eslint`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enzyme matchers do not match correctly children of React Fragments

2 participants