We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16ba7cb commit b64235cCopy full SHA for b64235c
lib/src/models/documents/nodes/container.dart
@@ -25,7 +25,7 @@ abstract class Container<T extends Node?> extends Node {
25
int get childCount => _children.length;
26
27
/// Returns the first child [Node].
28
- Node get first => _children.first;
+ Node? get first => isEmpty ? null : _children.first;
29
30
/// Returns the last child [Node].
31
Node get last => _children.last;
0 commit comments