0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-06 14:50:21 -05:00

fix(lorem-ipsum-plugin): fix typing problem

This commit is contained in:
alonso.torres 2024-06-24 11:11:09 +02:00 committed by Alonso Torres
parent 2ba873f2cd
commit 218a62833d

View file

@ -46,9 +46,11 @@ function generateText(event: TextPluginUIEvent) {
if (!selection.length) {
const text = penpot.createText('lorem ipsum');
text.x = penpot.viewport.center.x;
text.y = penpot.viewport.center.y;
selection.push(text);
if (text) {
text.x = penpot.viewport.center.x;
text.y = penpot.viewport.center.y;
selection.push(text);
}
}
selection.forEach((it) => {