Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 721d6c1a authored by Robin Tissot's avatar Robin Tissot
Browse files

Fixes transcription page > 1 not correctly loaded.

parent efa95a91
No related branches found
No related tags found
No related merge requests found
......@@ -83,13 +83,13 @@ export const actions = {
// then fetch all content page by page
let fetchPage = async function(page) {
const resp = await api.retrievePage(rootState.document.id, rootState.parts.pk, transcription, page)
let data = resp.data
for (var i=0; i<data.results.length; i++) {
let line = rootState.lines.all.find(l=>l.pk == data.results[i].line)
commit('lines/setTranscriptions', { pk: line.pk, transcription: data.results[i] }, {root: true})
}
if (data.next) fetchPage(page+1)
if (data.next) await fetchPage(page+1)
}
await fetchPage(1)
},
......@@ -162,4 +162,4 @@ export default {
state: initialState(),
mutations,
actions
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment