Skip to content

Commit 102090e

Browse files
committed
Review comments
1 parent 74e0cf7 commit 102090e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/src/model.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,12 +3216,10 @@ abstract class ModelElement extends Canonicalization
32163216
return _documentationFrom;
32173217
}
32183218

3219-
bool get hasSourceHref => sourceHref != '';
3219+
bool get hasSourceHref => sourceHref.isNotEmpty;
32203220
String _sourceHref;
32213221
String get sourceHref {
3222-
if (_sourceHref == null) {
3223-
_sourceHref = new SourceLinker.fromElement(this).href();
3224-
}
3222+
_sourceHref ??= new SourceLinker.fromElement(this).href();
32253223
return _sourceHref;
32263224
}
32273225

0 commit comments

Comments
 (0)