Skip to content

Commit 998f30b

Browse files
authored
fix: fix crash when "Save as" is used
Closes #176
1 parent a4acc73 commit 998f30b

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/bpmn-editor.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,10 @@ export class BpmnEditor implements vscode.CustomEditorProvider<BpmnDocument> {
351351

352352
document.onDidDispose(() => disposeAll(listeners));
353353

354-
// track documents across rename and deletion
354+
// track documents
355355

356356
this.documents.add(uri, document);
357357

358-
document.onDidRename(e => {
359-
this.documents.rename(e.oldUri, e.newUri);
360-
});
361-
362358
document.onDidDispose(() => this.documents.remove(document.uri));
363359

364360
return document;
@@ -540,18 +536,6 @@ class DocumentCollection {
540536
return this._documents.delete(key);
541537
}
542538

543-
rename(oldUri: vscode.Uri, newUri: vscode.Uri) {
544-
545-
const document = this.get(oldUri);
546-
547-
if (!document) {
548-
throw new Error('document not found');
549-
}
550-
551-
this.remove(oldUri);
552-
this.add(newUri, document);
553-
}
554-
555539
add(uri: vscode.Uri, document: BpmnDocument) {
556540

557541
if (this.get(uri)) {

0 commit comments

Comments
 (0)