Skip to content

Commit 78a007a

Browse files
authored
Merge branch 'main' into copilot/fix-1011
2 parents d12f125 + 3f990d6 commit 78a007a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22

33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v5.0.0
4+
rev: v6.0.0
55
hooks:
66
- id: check-yaml
77
- id: end-of-file-fixer

src/electron/frontend/core/components/Table.js

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -669,13 +669,20 @@ export class Table extends LitElement {
669669
if (cell) {
670670
let message = "";
671671
let theme = "";
672-
if (warnings.length) {
673-
((theme = "warning"), (message = warnings.map((error) => error.message).join("\n")));
674-
} else cell.removeAttribute("warning");
672+
if (warnings.length > 0) {
673+
theme = "warning";
674+
message = warnings.map((error) => error.message).join("\n");
675+
} else {
676+
cell.removeAttribute("warning");
677+
}
675678

676-
if (errors.length) {
677-
((theme = "error"), (message = errors.map((error) => error.message).join("\n"))); // Class switching handled automatically
678-
} else cell.removeAttribute("error");
679+
if (errors.length > 0) {
680+
theme = "error";
681+
// Class switching handled automatically
682+
message = errors.map((error) => error.message).join("\n");
683+
} else {
684+
cell.removeAttribute("error");
685+
}
679686

680687
if (theme) cell.setAttribute(theme, "");
681688

0 commit comments

Comments
 (0)