Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

toArray return new array #395

Merged
merged 1 commit into from
Jun 21, 2017
Merged

toArray return new array #395

merged 1 commit into from
Jun 21, 2017

Conversation

ustccjw
Copy link
Contributor

@ustccjw ustccjw commented Jun 7, 2017

Follow codes make a problem

const children2 = React.Children.toArray(children)
    // const children2 = [...React.Children.toArray(children)]
    if (loop) {
      const firstChild = children2[0]
      const lastChild = children2[children2.length - 1]
      children2.push(firstChild)
      children2.unshift(lastChild)
    }

@developit developit merged commit 01fada6 into preactjs:master Jun 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants