Skip to content

Commit a1565a2

Browse files
committed
Use map to get the document annotations
1 parent 5bc6119 commit a1565a2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/server/static/components/annotationMixin.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,7 @@ export default {
9090
this.next = response.data.next;
9191
this.prev = response.data.previous;
9292
this.count = response.data.count;
93-
this.annotations = [];
94-
for (let i = 0; i < this.docs.length; i++) {
95-
const doc = this.docs[i];
96-
this.annotations.push(doc.annotations);
97-
}
93+
this.annotations = this.docs.map(doc => doc.annotations);
9894
this.offset = getOffsetFromUrl(this.url);
9995
});
10096
},

0 commit comments

Comments
 (0)