From db576ac23c5bd4caca641aa30bfe16b0235f1158 Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Wed, 6 Feb 2019 18:49:48 +0100 Subject: [PATCH] Fix issue #95 (active configs shown twice in pickConfig) --- src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,