refactor(core): use connection lookup to check for selected elements (#1737)

* refactor(core): use connection lookup to check for selected elements

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

* chore(changeset): add

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>

---------

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2025-01-12 10:05:01 +01:00
parent 3d1b85fce2
commit 6f3ed67463
3 changed files with 54 additions and 47 deletions
+17
View File
@@ -233,6 +233,23 @@ export function areConnectionMapsEqual(a?: Map<string, Connection>, b?: Map<stri
return true
}
/**
* @internal
*/
export function areSetsEqual(a: Set<string>, b: Set<string>) {
if (a.size !== b.size) {
return false
}
for (const item of a) {
if (!b.has(item)) {
return false
}
}
return true
}
/**
* @internal
*/