mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-07 15:39:49 -05:00
fix(icons-plugin): fix typing problem
This commit is contained in:
parent
018c29e244
commit
2ba873f2cd
1 changed files with 6 additions and 3 deletions
|
@ -12,10 +12,13 @@ penpot.ui.onMessage<PluginUIEvent>((message) => {
|
||||||
if (!svg || !name) {
|
if (!svg || !name) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const icon = penpot.createShapeFromSvg(svg);
|
const icon = penpot.createShapeFromSvg(svg);
|
||||||
icon.name = name;
|
if (icon) {
|
||||||
icon.x = penpot.viewport.center.x;
|
icon.name = name;
|
||||||
icon.y = penpot.viewport.center.y;
|
icon.x = penpot.viewport.center.x;
|
||||||
|
icon.y = penpot.viewport.center.y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue