Skip to content

vue-router2 _remove error on unbind #1

Description

@coedycode

Hi, I've been trying to use this module on a Vue2 project that's using a vue component per page with vue-router2.

When a page that's using a touch event is left, this code is throwing an error:

        unbind: function (el) {
            //删除dom监听事件
            el.touch._remove();
            el.touch = null;
        }

error: TypeError: Cannot read property '_remove' of null

I'm guessing the dom element has already been removed by the page transition, before this unbind event is triggered.

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