Commit 7a77b57
committed
fix(admin): KeyViz canvas drops dead width>0 fallback (PR #684 r2)
Claude bot round-2 cosmetic nit: the width > 0 ternary in
setTransform was never reachable in practice (the JSX only renders
the canvas when matrix.rows.length > 0, which implies width > 0).
Hoist the empty-matrix early return ahead of the transform call so
the live path collapses to a single ctx.setTransform expression.1 parent b10a0ae commit 7a77b57
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
149 | | - | |
150 | | - | |
151 | | - | |
| 156 | + | |
152 | 157 | | |
153 | | - | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
0 commit comments