Skip to content

Cannot read property 'set' of undefined #15

@elambro

Description

@elambro

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions