fix: undefined value error in setNode

This commit is contained in:
Eric Maciel 2020-10-29 09:16:04 -04:00
parent d0e54e543c
commit 176a0f650d

View File

@ -9,7 +9,9 @@ const setNode = (doc: SyncValue, op: SetNodeOperation): SyncValue => {
const { newProperties } = op
for (let key in newProperties) {
node[key] = newProperties[key]
if (newProperties[key] !== undefined) {
node[key] = newProperties[key]
}
}
return doc