mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
create "real" TextDocument when opening a notebook or when adding cells, don't create them again when the renderer makes models
This commit is contained in:
@@ -69,8 +69,8 @@ export class ExtHostDocuments implements ExtHostDocumentsShape {
|
||||
|
||||
public getDocument(resource: vscode.Uri): vscode.TextDocument {
|
||||
const data = this.getDocumentData(resource);
|
||||
if (!data || !data.document) {
|
||||
throw new Error('Unable to retrieve document from URI');
|
||||
if (!data?.document) {
|
||||
throw new Error(`Unable to retrieve document from URI '${resource}'`);
|
||||
}
|
||||
return data.document;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user