Don't try creating a new synced buffer if we already have one

Possibly https://github.com/Microsoft/TypeScript/issues/23502
This commit is contained in:
Matt Bierner
2018-04-30 18:18:05 -07:00
parent 0d584a9086
commit 55a10f77e8

View File

@@ -206,6 +206,11 @@ export default class BufferSyncSupport {
if (!filepath) {
return;
}
if (this.syncedBuffers.has(resource)) {
return;
}
const syncedBuffer = new SyncedBuffer(document, filepath, this, this.client);
this.syncedBuffers.set(resource, syncedBuffer);
syncedBuffer.open();