Skip to content

Uncaught TypeError: Cannot read property 'update' of undefined #685

Closed
@fullfs

Description

@fullfs

The error points to the code

p.notify = function () {
  for (var i = 0, l = this.subs.length; i < l; i++) {
    this.subs[i].update()
  }
}

The problem occurs at the setting a big amount of data to a single property (this.offer = offer) in a complex component.
Can't reproduce it in fiddle, but it looks like subs array changes its length while iterating it in notify.

Giving up on saving up subs length fixes the problem:

for (var i = 0; i < this.subs.length; i++) {

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