2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-21 17:29:04 +00:00

chore(utils): fix tags when converting icon set info

This commit is contained in:
Vjacheslav Trushkin 2024-12-16 16:37:26 +02:00
parent 9283cdfeda
commit bfdd3f021d
3 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,7 @@
"type": "module",
"description": "Common functions for working with Iconify icon sets used by various packages.",
"author": "Vjacheslav Trushkin",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/docs/libraries/utils/",

View File

@ -234,6 +234,11 @@ export function convertIconSetInfo(
info.category = source.category;
}
// Tags
if (source.tags instanceof Array) {
info.tags = source.tags;
}
// Palette
switch (typeof source.palette) {
case 'boolean':

View File

@ -287,6 +287,7 @@ describe('Testing convertIconSetInfo', () => {
height: 16,
palette: false,
category: 'General',
tags: ['Foo', 'Bar'],
};
const result = convertIconSetInfo(item);