@portabletext/editor 1.49.5 → 1.49.6

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/lib/index.cjs CHANGED
@@ -3017,28 +3017,29 @@ async function updateValue({
3017
3017
  streamBlocks ? await new Promise((resolve) => {
3018
3018
  slate.Editor.withoutNormalizing(slateEditor, () => {
3019
3019
  withRemoteChanges(slateEditor, () => {
3020
- withoutPatching(slateEditor, async () => {
3020
+ withoutPatching(slateEditor, () => {
3021
3021
  isChanged = removeExtraBlocks({
3022
3022
  slateEditor,
3023
3023
  slateValueFromProps
3024
- });
3025
- for await (const [currentBlock, currentBlockIndex] of getStreamedBlocks({
3026
- slateValue: slateValueFromProps
3027
- })) {
3028
- const {
3029
- blockChanged,
3030
- blockValid
3031
- } = syncBlock({
3032
- context,
3033
- sendBack,
3034
- block: currentBlock,
3035
- index: currentBlockIndex,
3036
- slateEditor,
3037
- value
3038
- });
3039
- isChanged = blockChanged || isChanged, isValid = isValid && blockValid;
3040
- }
3041
- resolve();
3024
+ }), (async () => {
3025
+ for await (const [currentBlock, currentBlockIndex] of getStreamedBlocks({
3026
+ slateValue: slateValueFromProps
3027
+ })) {
3028
+ const {
3029
+ blockChanged,
3030
+ blockValid
3031
+ } = syncBlock({
3032
+ context,
3033
+ sendBack,
3034
+ block: currentBlock,
3035
+ index: currentBlockIndex,
3036
+ slateEditor,
3037
+ value
3038
+ });
3039
+ isChanged = blockChanged || isChanged, isValid = isValid && blockValid;
3040
+ }
3041
+ resolve();
3042
+ })();
3042
3043
  });
3043
3044
  });
3044
3045
  });