mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 02:26:10 +02:00
🐛 Fix exception on paste invalid html
This commit is contained in:
parent
ecb85778bc
commit
79a164be6d
5 changed files with 75 additions and 69 deletions
|
@ -83,7 +83,10 @@ export function mapContentFragmentFromDocument(document, root, styleDefaults) {
|
|||
currentNode = nodeIterator.nextNode();
|
||||
}
|
||||
|
||||
fragment.appendChild(currentParagraph);
|
||||
if (currentParagraph) {
|
||||
fragment.appendChild(currentParagraph);
|
||||
}
|
||||
|
||||
if (fragment.children.length === 1) {
|
||||
const isContentInline = isContentFragmentFromDocumentInline(document);
|
||||
if (isContentInline) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue