Skip to content

Commit 6913885

Browse files
committed
PR Feedback; use Object.keys(errors).length !== 0
1 parent e7a337a commit 6913885

File tree

1 file changed

+1
-7
lines changed
  • site/frontend/src/pages/status_new

1 file changed

+1
-7
lines changed

site/frontend/src/pages/status_new/page.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,7 @@ function formatStatus(status: BenchmarkRequestStatus): string {
9999
}
100100
101101
function hasErrors(errors: Dict<string>) {
102-
// This is a bit odd but if the error object has values the loop will be
103-
// hit and thus return true.
104-
for (const key in errors) {
105-
console.log(key);
106-
return true;
107-
}
108-
return false;
102+
return Object.keys(errors).length !== 0;
109103
}
110104
111105
function getErrorsLength(errors: Dict<string>) {

0 commit comments

Comments
 (0)