vue3-infinite-loading
vue3-infinite-loading copied to clipboard
Cannot read properties of null (reading 'getBoundingClientRect')
I got this error on production build website Sentry stack trace show me that the error is from this package
I don't know why element is null, maybe we have to check
function isVisible(el: Element, view: Element | null): boolean {
if (!el) return false; //<-- maybe we add this to prevent error
const elRect = el.getBoundingClientRect();
if (!view) return elRect.top >= 0 && elRect.bottom <= window.innerHeight;
const viewRect = view.getBoundingClientRect();
return elRect.top >= viewRect.top && elRect.bottom <= viewRect.bottom;
}
I have the same issue
I have the same issue
I have the same issue