mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 20:44:05 +09:00
i -> index
This commit is contained in:
1 parent
31e710efca
commit
7f12dd370f
1 file changed
+3
-3
@@ -33,12 +33,12 @@ export const getInstancePathWithPositions = (
|
||||
|
||||
const find = (instance: Instance) => {
|
||||
if (instance.id === instanceId) return true;
|
||||
for (let i = 0; i < instance.children.length; i++) {
|
||||
const child = instance.children[i];
|
||||
for (let index = 0; index < instance.children.length; index++) {
|
||||
const child = instance.children[index];
|
||||
if (typeof child === "string") continue;
|
||||
const found = find(child);
|
||||
if (found) {
|
||||
path.push({ item: child, position: i });
|
||||
path.push({ item: child, position: index });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user