Commit 8396f8d
refactor(AnalyticalTable - useToggleRowExpand): remove useless conditional (#8552)
To fix this without changing functionality, simplify the boolean
condition in `getToggleRowExpandedProps` at line 24 by removing the
redundant `renderRowSubComponent && ...` branch.
General approach:
- Replace logically redundant boolean expressions with their minimal
equivalent form.
- Keep behavior identical while making intent explicit and avoiding
static-analysis warnings.
Best concrete fix in this file:
- In
`packages/main/src/components/AnalyticalTable/hooks/useToggleRowExpand.ts`,
change:
- `(!renderRowSubComponent || (renderRowSubComponent &&
alwaysShowSubComponent))`
- to
- `(!renderRowSubComponent || alwaysShowSubComponent)`
No imports, helper methods, or additional definitions are required.
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>1 parent a878d16 commit 8396f8d
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments