mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-23 15:32:59 +02:00
fixing a breaking change in node/mark properties (#1049)
This commit is contained in:
committed by
Ian Storm Taylor
parent
e72266802d
commit
05ab702e40
@@ -133,9 +133,7 @@ function markProperties(value = {}) {
|
|||||||
for (const k in value) {
|
for (const k in value) {
|
||||||
if (k == 'data') {
|
if (k == 'data') {
|
||||||
if (value[k] !== undefined) ret[k] = Data.create(value[k])
|
if (value[k] !== undefined) ret[k] = Data.create(value[k])
|
||||||
} else if (k.startsWith('@@__SLATE')) {
|
} else if (!k.startsWith('@@__SLATE')) {
|
||||||
return
|
|
||||||
} else {
|
|
||||||
ret[k] = value[k]
|
ret[k] = value[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,9 +166,7 @@ function nodeProperties(value = {}) {
|
|||||||
for (const k in value) {
|
for (const k in value) {
|
||||||
if (k == 'data') {
|
if (k == 'data') {
|
||||||
if (value[k] !== undefined) ret[k] = Data.create(value[k])
|
if (value[k] !== undefined) ret[k] = Data.create(value[k])
|
||||||
} else if (k.startsWith('@@__SLATE')) {
|
} else if (!k.startsWith('@@__SLATE')) {
|
||||||
return
|
|
||||||
} else {
|
|
||||||
ret[k] = value[k]
|
ret[k] = value[k]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user