Browse Source

Use map to get the document annotations

pull/251/head
Guillaume Claret 6 years ago
parent
commit
a1565a212f
1 changed files with 1 additions and 5 deletions
  1. 6
      app/server/static/components/annotationMixin.js

6
app/server/static/components/annotationMixin.js

@ -90,11 +90,7 @@ export default {
this.next = response.data.next;
this.prev = response.data.previous;
this.count = response.data.count;
this.annotations = [];
for (let i = 0; i < this.docs.length; i++) {
const doc = this.docs[i];
this.annotations.push(doc.annotations);
}
this.annotations = this.docs.map(doc => doc.annotations);
this.offset = getOffsetFromUrl(this.url);
});
},

Loading…
Cancel
Save