@haklex/rich-plugin-block-handle 0.0.103 → 0.0.105

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -2
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -357,7 +357,7 @@ function useBlockSelection(editor) {
357
357
  const unregCopy = editor.registerCommand(
358
358
  COPY_COMMAND,
359
359
  (event) => {
360
- if (!event?.clipboardData) return false;
360
+ if (!event || !("clipboardData" in event) || !event.clipboardData) return false;
361
361
  let handled = false;
362
362
  editor.getEditorState().read(() => {
363
363
  const nodes = getOwnedSelectionNodes();
@@ -376,7 +376,7 @@ function useBlockSelection(editor) {
376
376
  const unregCut = editor.registerCommand(
377
377
  CUT_COMMAND,
378
378
  (event) => {
379
- if (!event?.clipboardData) return false;
379
+ if (!event || !("clipboardData" in event) || !event.clipboardData) return false;
380
380
  let keysToDelete = [];
381
381
  editor.getEditorState().read(() => {
382
382
  const nodes = getOwnedSelectionNodes();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haklex/rich-plugin-block-handle",
3
- "version": "0.0.103",
3
+ "version": "0.0.105",
4
4
  "description": "Block handle plugin with add button and context menu",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "@lexical/code-core": "^0.42.0",
25
- "@haklex/rich-style-token": "0.0.103",
26
- "@haklex/rich-editor-ui": "0.0.103"
25
+ "@haklex/rich-style-token": "0.0.105",
26
+ "@haklex/rich-editor-ui": "0.0.105"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@lexical/html": "^0.42.0",