Skip to content

Commit cfdd199

Browse files
Don’t use inline if
+ Since codecov is so bae as the kids would say
1 parent c00f6e3 commit cfdd199

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/src/util/rem_util.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ CssValue toRem(dynamic value, {bool treatNumAsRem: false, bool passThroughUnsupp
120120
} else if (parsedValue?.unit == 'px') {
121121
remValueNum = parsedValue.number / rootFontSize;
122122
} else {
123-
if (passThroughUnsupportedUnits) return parsedValue;
123+
if (passThroughUnsupportedUnits) {
124+
return parsedValue;
125+
}
124126

125127
throw new ArgumentError.value(value, 'value', 'must be a px num or a String px/rem value');
126128
}
@@ -165,7 +167,9 @@ CssValue toPx(dynamic value, {bool treatNumAsPx: false, bool passThroughUnsuppor
165167
} else if (parsedValue?.unit == 'rem') {
166168
pxValueNum = parsedValue.number * rootFontSize;
167169
} else {
168-
if (passThroughUnsupportedUnits) return parsedValue;
170+
if (passThroughUnsupportedUnits) {
171+
return parsedValue;
172+
}
169173

170174
throw new ArgumentError.value(value, 'value', 'must be a rem num or a String px/rem value');
171175
}

0 commit comments

Comments
 (0)