Skip to content
Snippets Groups Projects
Commit c9f99789 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Merge branch '1344-ui-does-not-show-bs-and-dos-together' into 'develop'

Fixed issue with retrieving entry_id from older entries.

Closes #1344

See merge request !1102
parents 90c101bf 3128ef18
Branches
Tags
1 merge request!1102Fixed issue with retrieving entry_id from older entries.
Pipeline #157605 passed
...@@ -123,8 +123,10 @@ const OverviewView = React.memo(() => { ...@@ -123,8 +123,10 @@ const OverviewView = React.memo(() => {
const { data: index, response: indexApiData } = useIndex() const { data: index, response: indexApiData } = useIndex()
const { url, exists, editable, archive: archiveTmp, archiveApiData } = useEntryStore(required) const { url, exists, editable, archive: archiveTmp, archiveApiData } = useEntryStore(required)
// The archive is accepted only once it is synced with the index // The archive is accepted only once it is synced with the index. Notice that
const archive = index?.entry_id === archiveTmp?.metadata?.entry_id // we need to get the entry_id from data.entry_id, as some older entries will
// not have entry_id stored under data.archive.metadata.entry_id
const archive = index?.entry_id === archiveApiData?.response?.data?.entry_id
? archiveTmp ? archiveTmp
: undefined : undefined
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment