diff --git a/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts index 00718254a0f..1518dc43d00 100644 --- a/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/common/extHostDocumentsAndEditors.ts @@ -92,12 +92,11 @@ export class ExtHostDocumentsAndEditors implements ExtHostDocumentsAndEditorsSha data.versionId, data.isDirty )); + this._documents.set(resource, ref); + addedDocuments.push(ref.value); } ref.ref(); - - this._documents.set(resource, ref); - addedDocuments.push(ref.value); } }