From a1bdc3488a5ad33a5bc2970a99a42fc08aa5549a Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Thu, 17 Mar 2022 17:10:03 +0200 Subject: [PATCH] chore: fix eslint error in utils.ts --- packages/utils/src/loader/utils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/utils/src/loader/utils.ts b/packages/utils/src/loader/utils.ts index 01a8b49..0745231 100644 --- a/packages/utils/src/loader/utils.ts +++ b/packages/utils/src/loader/utils.ts @@ -94,16 +94,17 @@ export async function mergeIconProps( } } - if (options && options.usedProps) { + const usedProps = options?.usedProps; + if (usedProps) { Object.keys(additionalProps).forEach((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) { - options.usedProps.width = props.width; + usedProps.width = props.width; } if (typeof props.height !== 'undefined' && props.height !== null) { - options.usedProps.height = props.height; + usedProps.height = props.height; } }