diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f61269cdc..11aeb7429 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer diff --git a/src/electron/frontend/core/components/Table.js b/src/electron/frontend/core/components/Table.js index 3882fea2a..c615f9b90 100644 --- a/src/electron/frontend/core/components/Table.js +++ b/src/electron/frontend/core/components/Table.js @@ -669,13 +669,20 @@ export class Table extends LitElement { if (cell) { let message = ""; let theme = ""; - if (warnings.length) { - (theme = "warning"), (message = warnings.map((error) => error.message).join("\n")); - } else cell.removeAttribute("warning"); + if (warnings.length > 0) { + theme = "warning"; + message = warnings.map((error) => error.message).join("\n"); + } else { + cell.removeAttribute("warning"); + } - if (errors.length) { - (theme = "error"), (message = errors.map((error) => error.message).join("\n")); // Class switching handled automatically - } else cell.removeAttribute("error"); + if (errors.length > 0) { + theme = "error"; + // Class switching handled automatically + message = errors.map((error) => error.message).join("\n"); + } else { + cell.removeAttribute("error"); + } if (theme) cell.setAttribute(theme, "");