Commit 55356682 authored by Robert Knight's avatar Robert Knight

Rename `id` variable to `annotationId` for clarity

parent 360b6431
...@@ -35,7 +35,7 @@ function AnnotationViewerContentController( ...@@ -35,7 +35,7 @@ function AnnotationViewerContentController(
) { ) {
store.clearAnnotations(); store.clearAnnotations();
const id = store.routeParams().id; const annotationId = store.routeParams().id;
this.rootThread = () => rootThread.thread(store.getState()); this.rootThread = () => rootThread.thread(store.getState());
...@@ -43,7 +43,7 @@ function AnnotationViewerContentController( ...@@ -43,7 +43,7 @@ function AnnotationViewerContentController(
store.setCollapsed(id, collapsed); store.setCollapsed(id, collapsed);
}; };
this.ready = fetchThread(api, id).then(function(annots) { this.ready = fetchThread(api, annotationId).then(function(annots) {
annotationMapper.loadAnnotations(annots); annotationMapper.loadAnnotations(annots);
const topLevelAnnot = annots.filter(function(annot) { const topLevelAnnot = annots.filter(function(annot) {
...@@ -64,8 +64,8 @@ function AnnotationViewerContentController( ...@@ -64,8 +64,8 @@ function AnnotationViewerContentController(
store.setCollapsed(annot.id, false); store.setCollapsed(annot.id, false);
}); });
if (topLevelAnnot.id !== id) { if (topLevelAnnot.id !== annotationId) {
store.highlightAnnotations([id]); store.highlightAnnotations([annotationId]);
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment