Skip to content

Commit

Permalink
Avoid unnecessary op.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulion committed May 20, 2021
1 parent 34a1277 commit 3e55e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/slate/src/transforms/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ export const NodeTransforms: NodeTransforms = {
continue
}

if (props[k] !== node[k]) {
if (props[k] !== node[k] && !(props[k] == null && !node.hasOwnProperty(k))) {
properties[k] = node[k]
newProperties[k] = props[k]
}
Expand Down

0 comments on commit 3e55e75

Please sign in to comment.