From ff3687c1fddc0b5478de55abc2d546ec443409c4 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 6 Jun 2024 00:35:21 +0530 Subject: [PATCH] feat: check if the modified path still uniquely identifies the element: --- server/src/workflow-management/selector.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/selector.ts b/server/src/workflow-management/selector.ts index 19b5567c..3d440963 100644 --- a/server/src/workflow-management/selector.ts +++ b/server/src/workflow-management/selector.ts @@ -450,7 +450,11 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => { if (scope.visited.has(newPathKey)) { return; } - + if (unique(newPath) && same(newPath, input)) { + yield newPath; + scope.visited.set(newPathKey, true); + yield* optimize(newPath, input, scope); + } } } }