Skip to content

Commit

Permalink
fix: apply mutation (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Feb 27, 2024
1 parent b1d186f commit ccd30dc
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -76,7 +76,13 @@ export const RichTextEditingMutation: IMutation<IRichTextEditingMutationParams,
}

if (actions.length === 0) {
throw new Error('Mutation\'s length should great than 0 when call RichTextEditingMutation');
// The actions' length maybe 0 when the mutation is from collaborative editing.
// The return result will not be used.
return {
unitId,
actions: [],
textRanges: serializedSelections,
};
}

// Step 1: Update Doc Data Model.
Expand Down

0 comments on commit ccd30dc

Please sign in to comment.