We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9457d9 commit bc57bedCopy full SHA for bc57bed
src/adapter/LocalStoreAdapter.js
@@ -111,7 +111,13 @@ export default class LocalStoreAdapter extends StoreAdapter {
111
}
112
113
function getAnnotations(documentId, userId) {
114
- return JSON.parse(localStorage.getItem(`${documentId}/${userId}/annotations`)) || [];
+ 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;
121
122
123
function updateAnnotations(documentId, userId, annotations) {
0 commit comments