Skip to content

Commit ef62c80

Browse files
committed
fix: warn when initialContent is used with withCollaboration
1 parent ac73140 commit ef62c80

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • packages/core/src/yjs/extensions

packages/core/src/yjs/extensions/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ export function withCollaboration<
6969
collaboration: CollaborationOptions;
7070
},
7171
): Options {
72+
if (options.initialContent) {
73+
// eslint-disable-next-line no-console
74+
console.warn(
75+
"When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider",
76+
);
77+
}
78+
7279
return {
7380
...options,
7481
extensions: [

0 commit comments

Comments
 (0)