1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 03:32:36 +02:00

Fix _normalizeNodeWith

This commit is contained in:
Soreine
2016-10-28 10:30:33 +02:00
parent ddb8522584
commit 164ecc6d76

View File

@@ -55,8 +55,8 @@ function _normalizeNodeWith(transform, schema, node) {
let recursiveCount = 0 let recursiveCount = 0
// Auxiliary function, called recursively, with a maximum calls safety net. // Auxiliary function, called recursively, with a maximum calls safety net.
function _recur(_transform, _schema, _node) { function _recur(_transform, _node) {
const failure = _schema.__validate(_node) const failure = schema.__validate(_node)
// Node is valid? // Node is valid?
if (!failure) { if (!failure) {
@@ -81,10 +81,10 @@ function _normalizeNodeWith(transform, schema, node) {
throw new Error('Unexpected number of successive normalizations. Aborting.') throw new Error('Unexpected number of successive normalizations. Aborting.')
} }
return _recur(_transform, _schema, _node) return _recur(_transform, newNode)
} }
return _recur(transform, schema, node) return _recur(transform, node)
} }
/** /**