Skip to content

Commit 46676b3

Browse files
davidbrochartandrii-i
authored andcommitted
Fix renaming file (jupyterlab#413)
1 parent 4da609e commit 46676b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/docprovider/src/ydrive.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ export class YDrive extends Drive implements ICollaborativeDrive {
206206
// A change in hash signifies that a save occurred on the server-side
207207
// (e.g. a collaborator performed the save) - we want to notify the
208208
// observers about this change so that they can store the new hash value.
209-
const model = await this.get(options.path, { content: false });
209+
const newPath = sharedModel.state.path ?? options.path;
210+
const model = await this.get(newPath as string, { content: false });
210211

211212
this._ydriveFileChanged.emit({
212213
type: 'save',

0 commit comments

Comments
 (0)