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.js
CHANGED
|
@@ -726,8 +726,8 @@ var createEditor = function createEditor() {
|
|
|
726
726
|
},
|
|
727
727
|
shouldNormalize: function shouldNormalize(_ref5) {
|
|
728
728
|
var iteration = _ref5.iteration,
|
|
729
|
-
|
|
730
|
-
var maxIterations =
|
|
729
|
+
initialDirtyPathsLength = _ref5.initialDirtyPathsLength;
|
|
730
|
+
var maxIterations = initialDirtyPathsLength * 42; // HACK: better way?
|
|
731
731
|
|
|
732
732
|
if (iteration > maxIterations) {
|
|
733
733
|
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."));
|
|
@@ -2022,13 +2022,15 @@ var Editor = {
|
|
|
2022
2022
|
_iterator6.f();
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
getDirtyPaths(editor);
|
|
2025
|
+
var dirtyPaths = getDirtyPaths(editor);
|
|
2026
|
+
var initialDirtyPathsLength = dirtyPaths.length;
|
|
2026
2027
|
var iteration = 0;
|
|
2027
2028
|
|
|
2028
|
-
while (
|
|
2029
|
+
while (dirtyPaths.length !== 0) {
|
|
2029
2030
|
if (!editor.shouldNormalize({
|
|
2031
|
+
dirtyPaths: dirtyPaths,
|
|
2030
2032
|
iteration: iteration,
|
|
2031
|
-
|
|
2033
|
+
initialDirtyPathsLength: initialDirtyPathsLength,
|
|
2032
2034
|
operation: operation
|
|
2033
2035
|
})) {
|
|
2034
2036
|
return;
|
|
@@ -2044,6 +2046,7 @@ var Editor = {
|
|
|
2044
2046
|
}
|
|
2045
2047
|
|
|
2046
2048
|
iteration++;
|
|
2049
|
+
dirtyPaths = getDirtyPaths(editor);
|
|
2047
2050
|
}
|
|
2048
2051
|
});
|
|
2049
2052
|
},
|