diff --git a/public/app/features/annotations/annotations_srv.ts b/public/app/features/annotations/annotations_srv.ts index e150f6614be..bd8ae8aa16e 100644 --- a/public/app/features/annotations/annotations_srv.ts +++ b/public/app/features/annotations/annotations_srv.ts @@ -60,10 +60,6 @@ export class AnnotationsSrv { }); annotations = dedupAnnotations(annotations); - for (let i = 0; i < annotations.length; i++) { - const a = annotations[i]; - a.isRegion = a.time !== a.timeEnd; - } // look for alert state for this panel const alertState: any = _.find(results[1], { panelId: options.panel.id }); @@ -181,7 +177,9 @@ export class AnnotationsSrv { for (const item of results) { item.source = annotation; + item.isRegion = item.timeEnd && item.time !== item.timeEnd; } + return results; } }