Skip to content

Commit

Permalink
remove Children.only from react-fela (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinweser authored Feb 12, 2021
1 parent 36589ad commit 5b81e09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/react-fela/src/RendererProvider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow */
import { Component, Children, createElement } from 'react'
import { Component, createElement } from 'react'
import { RendererProviderFactory } from 'fela-bindings'
import PropTypes from 'prop-types'

Expand All @@ -9,7 +9,7 @@ export default RendererProviderFactory(
Component,
RendererContext,
createElement,
(children) => Children.only(children),
(children) => children,
{
propTypes: {
renderer: PropTypes.object.isRequired,
Expand Down
8 changes: 5 additions & 3 deletions packages/react-fela/src/ThemeProvider.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* @flow */
import { createElement, Children } from 'react'
import { createElement } from 'react'
import { ThemeProviderFactory } from 'fela-bindings'
import PropTypes from 'prop-types'

import { ThemeContext } from './context'

export default ThemeProviderFactory(ThemeContext, createElement, (children) =>
Children.only(children)
export default ThemeProviderFactory(
ThemeContext,
createElement,
(children) => children
)

1 comment on commit 5b81e09

@vercel
Copy link

@vercel vercel bot commented on 5b81e09 Feb 12, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.