Been relying on this great polyfill for a while, so thank you!
Just started seeing a TypeError when null is passed in as the first argument to window.scrollTo:
Uncaught TypeError: Cannot read property 'left' of null
Although null is accommodated in the utility here, it needs to be subsequently handled here once shouldBailOut(arguments[0]) evaluates to true.
I have a branch adding a few quick checks wherever the original scroll functions are called. Please let me know if this looks like it might be worth fixing. If so, I have a PR ready here #160.
Additional context: ran into this issue while using both the polyfill as well as CodeMirror, which calls window.scrollTo here.
Been relying on this great polyfill for a while, so thank you!
Just started seeing a
TypeErrorwhennullis passed in as the first argument towindow.scrollTo:Although
nullis accommodated in the utility here, it needs to be subsequently handled here onceshouldBailOut(arguments[0])evaluates totrue.I have a branch adding a few quick checks wherever the original scroll functions are called. Please let me know if this looks like it might be worth fixing. If so, I have a PR ready here #160.
Additional context: ran into this issue while using both the polyfill as well as CodeMirror, which calls
window.scrollTohere.