dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
181 stars 33 forks source link

removeAt(path, index) TypeError: Cannot read property 'indexOf' of undefined #660

Closed terrywarwar closed 8 years ago

terrywarwar commented 8 years ago

I'm getting the following error when removing an item from a list. The weird thing is it's notifying and the item is being removed from the UI.

 var model = new DomRepeatModel.fromEvent(e);
removeAt('info.users',model.index);

Error:

Uncaught Unhandled exception:
TypeError: Cannot read property 'indexOf' of undefined
#0      JsObject.callMethod (dart:js:1075)
#1      HtmlElement&PolymerMixin&PolymerBase.removeAt (package:polymer_interop/src/polymer_base.dart:380:36)
jakemac53 commented 8 years ago

This sounds like info.users is undefined possibly? Would it be possible for you to supply a full repro?

terrywarwar commented 8 years ago

info is set from an iron-ajax last-response. Will create a full repro shortly.

terrywarwar commented 8 years ago

I haven't been able to reproduce in another app.

jakemac53 commented 8 years ago

closing for now since I can't really take any action without a repro, please reopen if you are able to figure out more information.