1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-26 16:44:22 +02:00

Improve performances of normalizeChildrenWith by exiting if list are equals

This commit is contained in:
Samy Pessé
2016-11-02 17:34:42 +01:00
parent 77385326f0
commit b7ad0ba55c

View File

@@ -32,7 +32,10 @@ function _refreshNode(transform, node) {
*/
function _normalizeChildrenWith(transform, schema, node, prevNode) {
if (!node.nodes) {
if (
node.kind == 'text'
|| (prevNode && prevNode.nodes == node.nodes)
) {
return transform
}