mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix exception on paste invalid html
This commit is contained in:
committed by
Alejandro Alonso
parent
ecb85778bc
commit
79a164be6d
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user