2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-09 23:00:56 +00:00

Do not add redundant displayHeight to converted icon set info in Utils

This commit is contained in:
Vjacheslav Trushkin 2022-02-05 21:22:42 +02:00
parent 94580099d5
commit 0e4a3790b2
3 changed files with 2 additions and 5 deletions

View File

@ -70,7 +70,6 @@ describe('Testing convertIconSetInfo', () => {
},
height: 24,
samples: ['arrow-left', 'arrow-right', 'arrow-up'],
displayHeight: 24,
palette: true,
};
expect(result).toEqual(expected);
@ -175,7 +174,6 @@ describe('Testing convertIconSetInfo', () => {
},
height: 16,
samples: ['pushpin', 'pie-chart-outline', 'user-add-outline'],
displayHeight: 16,
palette: false,
category: 'General',
};

View File

@ -212,7 +212,7 @@ export function convertIconSetInfo(
if (typeof info.height === 'number') {
// Convert from height
const displayHeight = validateDisplayHeight(info.height);
if (displayHeight) {
if (displayHeight && displayHeight !== info.height) {
info.displayHeight = displayHeight;
}
}

View File

@ -71,7 +71,6 @@ describe('Testing convertIconSetInfo', () => {
},
height: 24,
samples: ['arrow-left', 'arrow-right', 'arrow-up'],
displayHeight: 24,
palette: true,
};
expect(result).toEqual(expected);
@ -176,7 +175,6 @@ describe('Testing convertIconSetInfo', () => {
},
height: 16,
samples: ['pushpin', 'pie-chart-outline', 'user-add-outline'],
displayHeight: 16,
palette: false,
category: 'General',
};
@ -279,6 +277,7 @@ describe('Testing convertIconSetInfo', () => {
},
samples: ['wrench', 'bell-o', 'user-o'],
version: '4.7.0',
height: 16,
palette: false,
category: 'General',
};