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

Minor changes to web component code

This commit is contained in:
Vjacheslav Trushkin 2022-05-20 21:13:30 +03:00
parent 95ff16aee9
commit 63322d9e0a

View File

@ -11,7 +11,9 @@ const viewBoxProps: (keyof IconifyIcon)[] = ['left', 'top', 'width', 'height'];
* Render icon * Render icon
*/ */
export function renderIcon(parent: Element | ShadowRoot, state: RenderedState) { export function renderIcon(parent: Element | ShadowRoot, state: RenderedState) {
let iconData = state.icon.data; const iconData = {
...state.icon.data,
};
const customisations = state.customisations; const customisations = state.customisations;
// Custom viewBox // Custom viewBox
@ -31,10 +33,7 @@ export function renderIcon(parent: Element | ShadowRoot, state: RenderedState) {
} }
if (!failed) { if (!failed) {
iconData = { Object.assign(iconData, customisedViewBox);
...iconData,
...customisedViewBox,
};
} }
} }
} }