Commit 3bddd56f authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

fix broken state on empty value lists

parent 3790e14b
......@@ -48,7 +48,8 @@ abstract class ResultState<T> extends CommonState {
};
Map<String, dynamic> get toShortMap => {
'value': value is Iterable ? (value as Iterable).last : value,
'value':
value is Iterable && (value as Iterable).isNotEmpty ? (value as Iterable).last : value,
...super.toMap,
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment