useDimensions: don't return null
This commit is contained in:
parent
934f354f9c
commit
273266d9ac
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ const useDimensions = (): UseDimensionsResult => {
|
|||
);
|
||||
|
||||
useEffect((): any => {
|
||||
if (!element) return null;
|
||||
if (!element) return;
|
||||
observer.observe(element);
|
||||
|
||||
return () => {
|
||||
|
|
Loading…
Reference in a new issue