diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-22 01:03:20 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-22 01:03:20 +0300 |
commit | 314ff9c134e898bcf42e277618ec813969ab84f9 (patch) | |
tree | 9673610a77b3a6aa70de848f487e2919a153d209 /src/components/AttachLink/AttachLink.tsx | |
parent | 551928f9fe5542dd91c9a8578124b4fb05fb9be2 (diff) | |
download | which-ui-314ff9c134e898bcf42e277618ec813969ab84f9.tar.gz |
refactor: use React.Children.only for wrappers
Diffstat (limited to 'src/components/AttachLink/AttachLink.tsx')
-rw-r--r-- | src/components/AttachLink/AttachLink.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/AttachLink/AttachLink.tsx b/src/components/AttachLink/AttachLink.tsx index e73f5c1..742ba65 100644 --- a/src/components/AttachLink/AttachLink.tsx +++ b/src/components/AttachLink/AttachLink.tsx @@ -25,7 +25,7 @@ const AttachLink: React.FC<PropTypes> = ({ callback, children }) => { </Button> ); - const child = children && React.Children.toArray(children)[0]; + const child = children && React.Children.only(children); return ( <> |