scroll-behavior-polyfill
scroll-behavior-polyfill copied to clipboard
Cannot read property 'set' of undefined
For old Android Chrome users (version < 80), the polyfill can throw an error - Cannot read property 'set' of undefined.
The following changes:
var ELEMENT_ORIGINAL_SCROLL_TOP_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT
? undefined
: (Object.getOwnPropertyDescriptor(Element.prototype, "scrollTop")||{}).set;
and
var ELEMENT_ORIGINAL_SCROLL_LEFT_SET_DESCRIPTOR = UNSUPPORTED_ENVIRONMENT
? undefined
: (Object.getOwnPropertyDescriptor(Element.prototype, "scrollLeft")||{}).set;
will let it fail silently.
Hi, any update on this issue, i'm facing the same. Regards