2
0
mirror of https://github.com/iconify/iconify.git synced 2025-01-23 07:08:34 +00:00

chore: fix eslint error in utils.ts

This commit is contained in:
Vjacheslav Trushkin 2022-03-17 17:10:03 +02:00
parent 23a089b6bf
commit a1bdc3488a

View File

@ -94,16 +94,17 @@ export async function mergeIconProps(
} }
} }
if (options && options.usedProps) { const usedProps = options?.usedProps;
if (usedProps) {
Object.keys(additionalProps).forEach((p) => { Object.keys(additionalProps).forEach((p) => {
const v = props[p]; const v = props[p];
if (v !== undefined && v !== null) options.usedProps![p] = v; if (v !== undefined && v !== null) usedProps[p] = v;
}); });
if (typeof props.width !== 'undefined' && props.width !== null) { if (typeof props.width !== 'undefined' && props.width !== null) {
options.usedProps.width = props.width; usedProps.width = props.width;
} }
if (typeof props.height !== 'undefined' && props.height !== null) { if (typeof props.height !== 'undefined' && props.height !== null) {
options.usedProps.height = props.height; usedProps.height = props.height;
} }
} }