From 977be340cb458a579b6866c04b8e4a6cfebef690 Mon Sep 17 00:00:00 2001 From: Alessio Occhipinti Date: Sun, 25 Nov 2018 22:12:49 +0100 Subject: [PATCH] fix: check on theme icon variant (#291) --- extensions/helpers/fs.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/helpers/fs.ts b/extensions/helpers/fs.ts index 9dca63b..ca80024 100644 --- a/extensions/helpers/fs.ts +++ b/extensions/helpers/fs.ts @@ -61,7 +61,10 @@ export function getThemeIconsContribute(ID: string): IPackageJSONThemeIcons { */ export function getIconVariantFromTheme(theme: string): string { const {themeIconVariants} = getDefaultValues(); - const found = Object.keys(themeIconVariants).find(variant => theme.includes(variant)); + const splitted = theme.split('-'); + const variantIcon = splitted[splitted.length - 1]; + const found = Object.keys(themeIconVariants) + .find(key => themeIconVariants[key].includes(variantIcon)); return found ? found.toLowerCase() : null; }