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:
parent
95ff16aee9
commit
63322d9e0a
@ -11,7 +11,9 @@ const viewBoxProps: (keyof IconifyIcon)[] = ['left', 'top', 'width', 'height'];
|
||||
* Render icon
|
||||
*/
|
||||
export function renderIcon(parent: Element | ShadowRoot, state: RenderedState) {
|
||||
let iconData = state.icon.data;
|
||||
const iconData = {
|
||||
...state.icon.data,
|
||||
};
|
||||
const customisations = state.customisations;
|
||||
|
||||
// Custom viewBox
|
||||
@ -31,10 +33,7 @@ export function renderIcon(parent: Element | ShadowRoot, state: RenderedState) {
|
||||
}
|
||||
|
||||
if (!failed) {
|
||||
iconData = {
|
||||
...iconData,
|
||||
...customisedViewBox,
|
||||
};
|
||||
Object.assign(iconData, customisedViewBox);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user