mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-06 14:50:21 -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) {
|
||||
return;
|
||||
}
|
||||
|
||||
const icon = penpot.createShapeFromSvg(svg);
|
||||
icon.name = name;
|
||||
icon.x = penpot.viewport.center.x;
|
||||
icon.y = penpot.viewport.center.y;
|
||||
if (icon) {
|
||||
icon.name = name;
|
||||
icon.x = penpot.viewport.center.x;
|
||||
icon.y = penpot.viewport.center.y;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue