File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ function handleViewport<
18
18
> (
19
19
TargetComponent : ComponentType < PropsWithoutRef < TProps > > ,
20
20
options : Options = defaultOptions ,
21
- config : Config = defaultConfig
21
+ config : Config = defaultConfig ,
22
22
) {
23
23
const ForwardedRefComponent = forwardRef < TElement , TProps > ( ( props , ref ) => {
24
24
const refProps = {
@@ -54,10 +54,9 @@ function handleViewport<
54
54
return < ForwardedRefComponent { ...props } ref = { node } /> ;
55
55
} ;
56
56
57
- const name =
58
- ( TargetComponent as React . FC ) . displayName ||
59
- ( TargetComponent as React . FC ) . name ||
60
- 'Component' ;
57
+ const name = ( TargetComponent as React . FC ) . displayName
58
+ || ( TargetComponent as React . FC ) . name
59
+ || 'Component' ;
61
60
InViewport . displayName = `handleViewport(${ name } )` ;
62
61
63
62
return hoistNonReactStatic ( InViewport , ForwardedRefComponent ) ;
You can’t perform that action at this time.
0 commit comments