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:
parent
9283cdfeda
commit
bfdd3f021d
@ -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/",
|
||||||
|
@ -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':
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user