_forwardMarkers must check for empty markerData, fixes https://github.com/microsoft/vscode/issues/136434

This commit is contained in:
Johannes Rieken
2021-11-05 10:51:12 +01:00
parent 9d092bc97a
commit 6ef5dbec55
2 changed files with 61 additions and 6 deletions

View File

@@ -37,12 +37,14 @@ export class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
private _forwardMarkers(resources: readonly URI[]): void {
const data: [UriComponents, IMarkerData[]][] = [];
for (const resource of resources) {
data.push([
resource,
this._markerService.read({ resource }).filter(marker => !this._activeOwners.has(marker.owner))
]);
const markerData = this._markerService.read({ resource }).filter(marker => !this._activeOwners.has(marker.owner));
if (markerData.length > 0) {
data.push([resource, markerData]);
}
}
if (data.length > 0) {
this._proxy.$acceptMarkersChange(data);
}
this._proxy.$acceptMarkersChange(data);
}
$changeMany(owner: string, entries: [UriComponents, IMarkerData[]][]): void {