Skip to content

Commit 403c20a

Browse files
committed
no duplicated idf setup extension
1 parent 9d367e5 commit 403c20a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/extension.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -3893,9 +3893,13 @@ async function getFrameworksPickItems() {
38933893
);
38943894
existingIdfSetups = [...existingIdfSetups, ...systemIdfSetups];
38953895
}
3896-
const onlyValidIdfSetups = [...idfSetups, ...existingIdfSetups].filter(
3897-
(i) => i.isValid
3898-
);
3896+
const onlyValidIdfSetups = [
3897+
...new Map(
3898+
[...idfSetups, ...existingIdfSetups]
3899+
.filter((i) => i.isValid)
3900+
.map((item) => [item.idfPath, item])
3901+
).values(),
3902+
];
38993903
const currentIdfSetup = await getCurrentIdfSetup(workspaceRoot);
39003904
for (const idfSetup of onlyValidIdfSetups) {
39013905
pickItems.push({

0 commit comments

Comments
 (0)