diff --git a/CHANGELOG.md b/CHANGELOG.md index 50deb7fb7df56..029212352279c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.13.2+2 + +* Update signature for implementations of `Iterable.singleWhere` to include + optional argument. + ## 0.13.2+1 * Changed the implementation of `Set` and `List` classes to use base classes diff --git a/lib/dom.dart b/lib/dom.dart index fb0d458658613..df9655e170d5a 100644 --- a/lib/dom.dart +++ b/lib/dom.dart @@ -951,7 +951,8 @@ class FilteredElementList extends IterableBase return _filtered.lastWhere(test, orElse: orElse); } - Element singleWhere(bool test(Element value)) { + Element singleWhere(bool test(Element value), {Element orElse()}) { + if (orElse != null) throw new UnimplementedError('orElse'); return _filtered.singleWhere(test); } diff --git a/pubspec.yaml b/pubspec.yaml index acbe3f60db1dc..59f1650b25a08 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: html -version: 0.13.2+1 +version: 0.13.2+2 author: Dart Team description: A library for working with HTML documents. Previously known as html5lib. homepage: https://github.com/dart-lang/html