useDimensions: don't return null

This commit is contained in:
Alex Gleason 2023-01-05 16:56:05 -06:00
parent 934f354f9c
commit 273266d9ac
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -25,7 +25,7 @@ const useDimensions = (): UseDimensionsResult => {
);
useEffect((): any => {
if (!element) return null;
if (!element) return;
observer.observe(element);
return () => {