Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Oct 4, 2024
1 parent 3a7b48c commit 581484c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/docprovider-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"watch:labextension": "jupyter labextension watch ."
},
"dependencies": {
"@jupyter/docprovider": "^3.0.0-beta.6",
"@jupyter/collaborativedrive": "^3.0.0-beta.6",
"@jupyter/docprovider": "^3.0.0-beta.6",
"@jupyter/ydoc": "^2.0.0 || ^3.0.0-a3",
"@jupyterlab/application": "^4.2.0",
"@jupyterlab/apputils": "^4.2.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/docprovider/src/ydrive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class YDrive extends Drive implements ICollaborativeDrive {
* Yjs sharedModel factory for real-time collaboration.
*/
class SharedModelFactory implements ISharedModelFactory {
private _documentFactories: Map<Contents.ContentType, SharedDocumentFactory>;
documentFactories: Map<Contents.ContentType, SharedDocumentFactory>;

/**
* Shared model factory constructor
Expand All @@ -264,7 +264,7 @@ class SharedModelFactory implements ISharedModelFactory {
sharedModel: YDocument<DocumentChange>
) => void
) {
this._documentFactories = new Map();
this.documentFactories = new Map();
}

/**
Expand All @@ -282,10 +282,10 @@ class SharedModelFactory implements ISharedModelFactory {
type: Contents.ContentType,
factory: SharedDocumentFactory
) {
if (this._documentFactories.has(type)) {
if (this.documentFactories.has(type)) {
throw new Error(`The content type ${type} already exists`);
}
this._documentFactories.set(type, factory);
this.documentFactories.set(type, factory);
}

/**
Expand All @@ -307,8 +307,8 @@ class SharedModelFactory implements ISharedModelFactory {
return;
}

if (this._documentFactories.has(options.contentType)) {
const factory = this._documentFactories.get(options.contentType)!;
if (this.documentFactories.has(options.contentType)) {
const factory = this.documentFactories.get(options.contentType)!;
const sharedModel = factory(options);
this._onCreate(options, sharedModel);
return sharedModel;
Expand Down

0 comments on commit 581484c

Please sign in to comment.