dart-archive / observe

Support for marking objects as observable, and getting notifications when those objects are mutated
https://pub.dartlang.org/packages/observe
BSD 3-Clause "New" or "Revised" License
13 stars 6 forks source link

[observe] not found binding on String tries to use indexer and fails #57

Closed DartBot closed 9 years ago

DartBot commented 9 years ago

Issue by jmesserly Originally opened as dart-lang/sdk#16123


If the model is a String, and the path is something invalid like "foo.bar", _getObjectProperty will try to index into it with "foo", which fails.

Either we need to be generally more restrictive about invalid paths (there is precedent, AFAIK Angular.dart is heading in that direction. Perhaps only nullable should be checked for.), or this bit of code needs to check for something else, perhaps a type test on Map<String, dynamic>

DartBot commented 9 years ago

Comment by anders-sandholm


Removed Library-Observe label. Added Pkg-Observe label.

DartBot commented 9 years ago

Comment by jmesserly


This is fixed with Indexable (I think it was Justin). Wooo!


Added Fixed label.