Skip to content

Commit a26a38e

Browse files
authored
Lenient processing in dartdoc page template comparison test. (#8350)
1 parent c75370f commit a26a38e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/test/dartdoc/dartdoc_page_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,11 @@ void main() {
155155
// cleanup <head> differences
156156
for (final link in ['/styles.css', '/github.css', '/favicon.png']) {
157157
fileXmlRoot.descendantElements
158-
.firstWhere((e) =>
158+
.where((e) =>
159159
e.localName == 'link' &&
160160
e.getAttribute('href')!.endsWith(link))
161-
.remove();
161+
.firstOrNull
162+
?.remove();
162163
}
163164
fileXmlRoot.descendantElements
164165
.firstWhereOrNull((e) => e.getAttribute('name') == 'generator')

0 commit comments

Comments
 (0)