diff --git a/src/extension.ts b/src/extension.ts index 9390c65..57aeb41 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -10,7 +10,7 @@ async function pickConfig(manager: Manager, activeOrNot?: boolean) { if (activeOrNot === false) { names = others.filter(c => !names.find(cc => cc.name === c.name)); } else if (activeOrNot === undefined) { - others.forEach(n => names.indexOf(n) === -1 && names.push(n)); + others.forEach(n => !names.find(c => c.name === n.name) && names.push(n)); } const options: vscode.QuickPickItem[] = names.map(config => ({ label: config.label || config.name,