Skip to content

Commit

Permalink
Fix default rootlib (#1301)
Browse files Browse the repository at this point in the history
  • Loading branch information
grouma authored Apr 6, 2021
1 parent dd61adc commit 8872986
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dwds/lib/src/debugging/libraries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ class LibraryHelper extends Domain {
// TODO: read entrypoint from app metadata.
// Issue: https://github.com/dart-lang/webdev/issues/1290
var libraries = await libraryRefs;
_rootLib = libraries.firstWhere((lib) => lib.name.contains('org-dartlang'));
_rootLib =
_rootLib ?? libraries.firstWhere((lib) => lib.name.contains('main'));
_rootLib = libraries.firstWhere((lib) => lib.name.contains('org-dartlang'),
orElse: () => null);
_rootLib = _rootLib ??
libraries.firstWhere((lib) => lib.name.contains('main'),
orElse: () => null);
_rootLib = _rootLib ?? (libraries.isNotEmpty ? libraries.last : null);
return _rootLib;
}
Expand Down

0 comments on commit 8872986

Please sign in to comment.