Fix outline icon variant

Summary:
Icon names including the -outline suffix get stripped out so the local path becomes the filled variant by default.
But it's only observable in release builds, because they are the only ones that use local icons.
This should fix that by keeping the variant in the local icon path as well.

Reviewed By: danielbuechele

Differential Revision: D17314646

fbshipit-source-id: b8402d85b1cc690caef7870194e60f22d17dca05
This commit is contained in:
John Knox
2019-09-11 07:20:17 -07:00
committed by Facebook Github Bot
parent f48fe21eaa
commit aac0927e25

View File

@@ -79,7 +79,10 @@ module.exports = {
variant = 'outline'; variant = 'outline';
} }
const localPath = path.join('icons', `${name}-${size}@${density}x.png`); const localPath = path.join(
'icons',
`${name}-${variant}-${size}@${density}x.png`,
);
// resolve icon locally if possible // resolve icon locally if possible
if ( if (
remote && remote &&