slate 0.91.3 → 0.91.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +8 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/interfaces/editor.d.ts +1 -0
- package/dist/interfaces/editor.d.ts.map +1 -1
- package/dist/slate.js +8 -5
- package/dist/slate.min.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -483,9 +483,9 @@ var createEditor = () => {
|
|
|
483
483
|
shouldNormalize: _ref4 => {
|
|
484
484
|
var {
|
|
485
485
|
iteration,
|
|
486
|
-
|
|
486
|
+
initialDirtyPathsLength
|
|
487
487
|
} = _ref4;
|
|
488
|
-
var maxIterations =
|
|
488
|
+
var maxIterations = initialDirtyPathsLength * 42; // HACK: better way?
|
|
489
489
|
|
|
490
490
|
if (iteration > maxIterations) {
|
|
491
491
|
throw new Error("Could not completely normalize the editor after ".concat(maxIterations, " iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));
|
|
@@ -1614,13 +1614,15 @@ var Editor = {
|
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
1616
|
|
|
1617
|
-
getDirtyPaths(editor);
|
|
1617
|
+
var dirtyPaths = getDirtyPaths(editor);
|
|
1618
|
+
var initialDirtyPathsLength = dirtyPaths.length;
|
|
1618
1619
|
var iteration = 0;
|
|
1619
1620
|
|
|
1620
|
-
while (
|
|
1621
|
+
while (dirtyPaths.length !== 0) {
|
|
1621
1622
|
if (!editor.shouldNormalize({
|
|
1623
|
+
dirtyPaths,
|
|
1622
1624
|
iteration,
|
|
1623
|
-
|
|
1625
|
+
initialDirtyPathsLength,
|
|
1624
1626
|
operation
|
|
1625
1627
|
})) {
|
|
1626
1628
|
return;
|
|
@@ -1638,6 +1640,7 @@ var Editor = {
|
|
|
1638
1640
|
}
|
|
1639
1641
|
|
|
1640
1642
|
iteration++;
|
|
1643
|
+
dirtyPaths = getDirtyPaths(editor);
|
|
1641
1644
|
}
|
|
1642
1645
|
});
|
|
1643
1646
|
},
|