Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: pkg/observe/lib/src/observable_list.dart

Issue 18267005: Fix bug in pkg:observe (observable_list.remove(Object)) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/observe/test/observable_list_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/src/observable_list.dart
diff --git a/pkg/observe/lib/src/observable_list.dart b/pkg/observe/lib/src/observable_list.dart
index bc66ea02f3f529aec48e2c4aa46819d43f061118..20213749eecf2eadc606b89e7f4fbf638b90e445 100644
--- a/pkg/observe/lib/src/observable_list.dart
+++ b/pkg/observe/lib/src/observable_list.dart
@@ -102,7 +102,7 @@ class ObservableList<E> extends _ListBaseWorkaround with ObservableMixin
bool remove(Object element) {
for (int i = 0; i < this.length; i++) {
if (this[i] == element) {
- removeRange(i, 1);
+ removeRange(i, i + 1);
return true;
}
}
« no previous file with comments | « no previous file | pkg/observe/test/observable_list_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698