Skip to content

Using the jquery plugin's removeResize function on "$(window)" throws an exception. #47

@JoolsCaesar

Description

@JoolsCaesar

I have some code that calls
$(container).resize(myFunc);
and then later
$(container).removeResize(myFunc);

Sometimes the container is an element, other times it is the window object. The resize function has check for when this == window and forwards to the default jquery resize handler. There is no such check in the removeResize function so it goes about trying to splice __resizeListeners__ which don't exist and throws an exception.

Uncaught TypeError: Cannot read property 'splice' of undefined

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