Skip to content

ResizeSensor: Cannot set property 'detach' of undefined" #189

Open
@huashengwang1989

Description

@huashengwang1989

ResizeSensor throws an error:
Error in directive resize update hook: "TypeError: Cannot set property 'detach' of undefined"

Chrome points me to these lines:

this.detach = function (ev) {
            ResizeSensor.detach(element, ev);
};

As in strict mode, this is undefined here.
Changing it to arrow function can solve the problem.

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