0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 12:28:54 -05:00

Merge pull request #2121 from andrewzhurov/3629-text-alignment-becomes-undefined-after-pasting-text-from-clipboard

🐛 Fix text alignment becoming undefined on pasting text from clipboard
This commit is contained in:
Andrey Antukh 2022-08-01 15:30:45 +02:00 committed by GitHub
commit f301ec5d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -378,10 +378,7 @@ export function insertText(state, text, attrs, inlineStyles) {
);
blockArray = blockArray.map((b) => {
if (b.getText() === "") {
return mergeBlockData(b, attrs)
}
return b;
return mergeBlockData(b, attrs);
});
const fragment = BlockMapBuilder.createFromArray(blockArray);