Skip to content

Commit f50768a

Browse files
authored
Merge pull request #902 from tneotia/tanay/bugfix/783-bad-state
Fix bad state no element (#783)
2 parents b6c580e + 59ba29e commit f50768a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/css_parser.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Style declarationsToStyle(Map<String, List<css.Expression>> declarations) {
150150
List<String> possibleBorderValues = ["dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "none", "hidden"];
151151
/// List<css.LiteralTerm> might include other values than the ones we want for [BorderSide.style], so make sure to remove those before passing it to [ExpressionMapping]
152152
potentialStyles.removeWhere((element) => element == null || !possibleBorderValues.contains(element.text));
153-
css.LiteralTerm borderStyle = potentialStyles.first!;
153+
css.LiteralTerm? borderStyle = potentialStyles.firstOrNull;
154154
Border newBorder = Border(
155155
left: style.border?.left ?? BorderSide.none,
156156
right: style.border?.right ?? BorderSide.none,

0 commit comments

Comments
 (0)