Skip to content

Commit de28ebe

Browse files
LuniMoonclaude
andcommitted
Fix Flow type error in getHighlightedCells loop variables
Explicitly type loop variables as number to avoid incompatible-type error when Flow infers the union type 0 | 1 | 2 from GridRect fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e1abe4e commit de28ebe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

newIDE/app/src/BehaviorsEditor/Editors/AnchorGridMapping.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export const getHighlightedCells = (rect: GridRect | null): Set<string> => {
143143
const cells = new Set<string>();
144144
if (!rect) return cells;
145145

146-
for (let col = rect.minCol; col <= rect.maxCol; col++) {
147-
for (let row = rect.minRow; row <= rect.maxRow; row++) {
146+
for (let col: number = rect.minCol; col <= rect.maxCol; col++) {
147+
for (let row: number = rect.minRow; row <= rect.maxRow; row++) {
148148
cells.add(`${col},${row}`);
149149
}
150150
}

0 commit comments

Comments
 (0)