slate-react 0.145.0 → 0.145.1
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/editable.d.ts.map +1 -1
- package/dist/index.es.js +6 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/slate-react.js +6 -1
- package/dist/slate-react.min.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4379,7 +4379,12 @@ var Editable = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {
|
|
|
4379
4379
|
}
|
|
4380
4380
|
if (ReactEditor.hasTarget(editor, event.target) && !isEventHandled(event, attributes.onClick) && slateDom.isDOMNode(event.target)) {
|
|
4381
4381
|
var node = ReactEditor.toSlateNode(editor, event.target);
|
|
4382
|
-
var path
|
|
4382
|
+
var path;
|
|
4383
|
+
try {
|
|
4384
|
+
path = ReactEditor.findPath(editor, node);
|
|
4385
|
+
} catch (_unused) {
|
|
4386
|
+
return;
|
|
4387
|
+
}
|
|
4383
4388
|
// At this time, the Slate document may be arbitrarily different,
|
|
4384
4389
|
// because onClick handlers can change the document before we get here.
|
|
4385
4390
|
// Therefore we must check that this path actually exists,
|