@lvce-editor/editor-worker 19.77.10 → 19.77.11

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/diff-sdk.js CHANGED
@@ -9963,6 +9963,10 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
9963
9963
  uri
9964
9964
  } = state;
9965
9965
  const commandResult = await fn(state, ...args);
9966
+ // A command with no update must leave the current editor state intact.
9967
+ if (commandResult === undefined) {
9968
+ return returnState ? state : undefined;
9969
+ }
9966
9970
  const shouldFormatAfterSave = commandResult?.postSaveFormat === true;
9967
9971
  let newEditor = !preservesTypingCoalescing && commandResult.canCoalesceTyping ? {
9968
9972
  ...commandResult,
@@ -10383,6 +10383,10 @@ const wrapCommand$1 = (fn, preservesTypingCoalescing = false, returnState = true
10383
10383
  uri
10384
10384
  } = state;
10385
10385
  const commandResult = await fn(state, ...args);
10386
+ // A command with no update must leave the current editor state intact.
10387
+ if (commandResult === undefined) {
10388
+ return returnState ? state : undefined;
10389
+ }
10386
10390
  const shouldFormatAfterSave = commandResult?.postSaveFormat === true;
10387
10391
  let newEditor = !preservesTypingCoalescing && commandResult.canCoalesceTyping ? {
10388
10392
  ...commandResult,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.77.10",
3
+ "version": "19.77.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"