Skip to content
Snippets Groups Projects

Fixed issue with retrieving entry_id from older entries.

Merged Lauri Himanen requested to merge 1344-ui-does-not-show-bs-and-dos-together into develop
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
@@ -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
Loading