mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 00:54:22 +02:00
Doc serializing fix (#4937)
Fixing a never ending recursive function in the serializing documentation.
This commit is contained in:
@@ -171,14 +171,14 @@ const deserialize = (el, markAttributes = {}) => {
|
||||
|
||||
const nodeAttributes = { ...markAttributes }
|
||||
|
||||
// define attibutes for text nodes
|
||||
// define attributes for text nodes
|
||||
switch (el.nodeName) {
|
||||
case 'strong':
|
||||
nodeAttributes.bold = true
|
||||
}
|
||||
|
||||
const children = Array.from(el.childNodes)
|
||||
.map(node => deserialize(el, nodeAttributes))
|
||||
.map(node => deserialize(node, nodeAttributes))
|
||||
.flat()
|
||||
|
||||
if (children.length === 0) {
|
||||
|
Reference in New Issue
Block a user