react-update-url-on-scroll icon indicating copy to clipboard operation
react-update-url-on-scroll copied to clipboard

Element = Null

Open marcoangelo opened this issue 5 years ago • 1 comments

import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import ScrollableSection from 'react-update-url-on-scroll';

import { ViewLanding } from './components/views/ViewLanding';
import { Test } from './components/views/Test';

export const AppRoutes: React.FC = () => {

	return  (
		<Router>
			<ScrollableSection name="Intro" href="/">
				<ViewLanding />
			</ScrollableSection>
			<ScrollableSection name="Test" href="test">
				<Test />
			</ScrollableSection>
		</Router>
	) 
};

Console error:

scroll.js:56 Uncaught TypeError: Cannot read property 'offsetHeight' of null
    at doesElementContainScrollTop (scroll.js:56)
    at scroll.js:117
    at Array.forEach (<anonymous>)
    at getBestAnchorGivenScrollLocation (scroll.js:114)
    at Manager.handleScroll (Manager.js:196)
    at later (func.js:18)

marcoangelo avatar Aug 12 '19 13:08 marcoangelo