From 7f12dd370facefae72d004db11ff00de1f73656c Mon Sep 17 00:00:00 2001 From: Roman Pominov Date: Wed, 24 Aug 2022 13:35:51 +0300 Subject: [PATCH] i -> index --- apps/designer/app/shared/tree-utils/get-instance-path.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/designer/app/shared/tree-utils/get-instance-path.ts b/apps/designer/app/shared/tree-utils/get-instance-path.ts index 546d571a27..9b2600c8dc 100644 --- a/apps/designer/app/shared/tree-utils/get-instance-path.ts +++ b/apps/designer/app/shared/tree-utils/get-instance-path.ts @@ -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; } }