adding assertion that newly created untitled document actually exists, #5016

This commit is contained in:
Johannes Rieken
2016-04-20 17:06:43 +02:00
parent 46523aec0e
commit 406cc18841

View File

@@ -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;