Skip to content

Commit bc57bed

Browse files
author
Victor Nazzaro
committed
Make multiple graders' commit shows up
1 parent d9457d9 commit bc57bed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/adapter/LocalStoreAdapter.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ export default class LocalStoreAdapter extends StoreAdapter {
111111
}
112112

113113
function getAnnotations(documentId, userId) {
114-
return JSON.parse(localStorage.getItem(`${documentId}/${userId}/annotations`)) || [];
114+
let all_annotations = [];
115+
for(let i = 0 ; i < localStorage.length; i++){
116+
if(localStorage.key(i).includes('annotations')){
117+
all_annotations.push(...JSON.parse(localStorage.getItem(localStorage.key(i))));
118+
}
119+
}
120+
return all_annotations;
115121
}
116122

117123
function updateAnnotations(documentId, userId, annotations) {

0 commit comments

Comments
 (0)