Skip to content

Cannot read property 'teardown' of null #716

Closed
@shuslav

Description

@shuslav

Hi,

When I subscribe the warcher to the NULL object property (e.g. keypath is 'Object.prop', where prop == null). The exception occures when I call unsubscriber.

Sample code:

var unwatch = vm.$watch('keypath', function (newVal, oldVal) {
});

unwatch(); // here the exception fires

The cause of the exception is a following code (exports._destroy function):

      for (i in this._userWatchers) {
        this._userWatchers[i].teardown()
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions