2
0
mirror of https://github.com/iconify/iconify.git synced 2024-12-22 01:38:56 +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", "type": "module",
"description": "Common functions for working with Iconify icon sets used by various packages.", "description": "Common functions for working with Iconify icon sets used by various packages.",
"author": "Vjacheslav Trushkin", "author": "Vjacheslav Trushkin",
"version": "2.2.0", "version": "2.2.1",
"license": "MIT", "license": "MIT",
"bugs": "https://github.com/iconify/iconify/issues", "bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/docs/libraries/utils/", "homepage": "https://iconify.design/docs/libraries/utils/",

View File

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

View File

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