mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
setNode as slate does.
This commit is contained in:
parent
f65ab040ee
commit
42ed7ea024
@ -10,7 +10,7 @@ const setNode = (doc: SyncValue, op: SetNodeOperation): SyncValue => {
|
|||||||
|
|
||||||
for (let key in newProperties) {
|
for (let key in newProperties) {
|
||||||
const value = newProperties[key]
|
const value = newProperties[key]
|
||||||
if (value !== undefined) {
|
if (value != null) {
|
||||||
node[key] = value
|
node[key] = value
|
||||||
} else {
|
} else {
|
||||||
delete node[key]
|
delete node[key]
|
||||||
|
Loading…
Reference in New Issue
Block a user