Skip to content

Commit

Permalink
Fix error on inserting node without raws in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Sep 14, 2024
1 parent 829ae47 commit c51e467
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ class Container extends Node {
i = i.proxyOf
if (i.parent) i.parent.removeChild(i)
if (i[isClean]) markTreeDirty(i)

// if (!i.raws) i.raws = {}
if (typeof i.raws.before === 'undefined') {
if (sample && typeof sample.raws.before !== 'undefined') {
i.raws.before = sample.raws.before.replace(/\S/g, '')
Expand Down

0 comments on commit c51e467

Please sign in to comment.