slate-react 0.128.0 → 0.128.2-20261007172010
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/components/slate.d.ts.map +1 -1
- package/dist/index.es.js +4 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +13 -6
- package/dist/slate-react.min.js +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4503,8 +4503,8 @@ var Slate = function Slate(props) {
|
|
|
4503
4503
|
onValueChange = props.onValueChange,
|
|
4504
4504
|
initialValue = props.initialValue,
|
|
4505
4505
|
rest = _objectWithoutProperties(props, _excluded);
|
|
4506
|
-
|
|
4507
|
-
|
|
4506
|
+
var initializedEditor = React.useRef(null);
|
|
4507
|
+
if (initializedEditor.current !== editor) {
|
|
4508
4508
|
if (!slate.Node.isNodeList(initialValue)) {
|
|
4509
4509
|
throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(slate.Scrubber.stringify(initialValue)));
|
|
4510
4510
|
}
|
|
@@ -4513,7 +4513,8 @@ var Slate = function Slate(props) {
|
|
|
4513
4513
|
}
|
|
4514
4514
|
editor.children = initialValue;
|
|
4515
4515
|
Object.assign(editor, rest);
|
|
4516
|
-
|
|
4516
|
+
initializedEditor.current = editor;
|
|
4517
|
+
}
|
|
4517
4518
|
var _useSelectorContext = useSelectorContext(),
|
|
4518
4519
|
selectorContext = _useSelectorContext.selectorContext,
|
|
4519
4520
|
handleSelectorChange = _useSelectorContext.onChange;
|