Remove unnecessary null checks in dev/devicelab (#118842)
This commit is contained in:
committed by
GitHub
parent
f291eb3495
commit
ab3c82244e
@@ -161,11 +161,11 @@ Future<TaskResult> runWebBenchmark({ required bool useCanvasKit }) async {
|
||||
|
||||
final String namespace = '$benchmarkName.$backend';
|
||||
final List<String> scoreKeys = List<String>.from(profile['scoreKeys'] as List<dynamic>);
|
||||
if (scoreKeys == null || scoreKeys.isEmpty) {
|
||||
if (scoreKeys.isEmpty) {
|
||||
throw 'No score keys in benchmark "$benchmarkName"';
|
||||
}
|
||||
for (final String scoreKey in scoreKeys) {
|
||||
if (scoreKey == null || scoreKey.isEmpty) {
|
||||
if (scoreKey.isEmpty) {
|
||||
throw 'Score key is empty in benchmark "$benchmarkName". '
|
||||
'Received [${scoreKeys.join(', ')}]';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user