mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
adding assertion that newly created untitled document actually exists, #5016
This commit is contained in:
@@ -613,6 +613,9 @@ export class MainThreadDocuments {
|
||||
if (input.getResource().toString() !== uri.toString()) {
|
||||
throw new Error(`expected URI ${uri.toString() } BUT GOT ${input.getResource().toString() }`);
|
||||
}
|
||||
if (!this._modelIsSynced[uri.toString()]) {
|
||||
throw new Error(`expected URI ${uri.toString()} to have come to LIFE`);
|
||||
}
|
||||
return this._proxy._acceptModelDirty(uri.toString()); // mark as dirty
|
||||
}).then(() => {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user