Skip to content
Snippets Groups Projects
Commit 616ead6f authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

put array in object for articles

parent 25ca6371
No related branches found
No related tags found
No related merge requests found
...@@ -89,14 +89,14 @@ export function useFetchArticle(doi: string) { ...@@ -89,14 +89,14 @@ export function useFetchArticle(doi: string) {
if (store.articles.size === 0) { if (store.articles.size === 0) {
const localArticles = await queryContent('/_partials/_articles').where({ _partial: true }).findOne() const localArticles = await queryContent('/_partials/_articles').where({ _partial: true }).findOne()
if (localArticles.body && store.articles.size <= 0) { console.log(localArticles)
for (const article of localArticles.body) { if (localArticles?.articles && store.articles.size <= 0) {
for (const article of localArticles.articles) {
store.add(article) store.add(article)
} }
} }
} }
if (store.articles.has(doi)) { if (store.articles.has(doi)) {
srcArticle.value = store.articles.get(doi) srcArticle.value = store.articles.get(doi)
return return
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
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