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:
parent
2ba873f2cd
commit
218a62833d
1 changed files with 5 additions and 3 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue