Skip to content

Commit

Permalink
dispose reference to notebook in replaceService
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamah committed Feb 13, 2023
1 parent 350ed49 commit 3c94737
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/search/browser/replaceService.ts
Expand Up @@ -118,10 +118,10 @@ export class ReplaceService implements IReplaceService {
if (notebookResource) {
// todo: find whether there is a common API for saving notebooks and text files
const ref = await this.notebookEditorModelResolverService.resolve(notebookResource);
return ref.object.save({ source: ReplaceService.REPLACE_SAVE_SOURCE });
} else {
return;
await ref.object.save({ source: ReplaceService.REPLACE_SAVE_SOURCE });
ref.dispose();
}
return;
} else {
return this.textFileService.files.get(e.resource)?.save({ source: ReplaceService.REPLACE_SAVE_SOURCE });
}
Expand Down

0 comments on commit 3c94737

Please sign in to comment.