Skip to content

Commit

Permalink
[Release] Verify that content item exists prior to fetching versions (#…
Browse files Browse the repository at this point in the history
…3099)

Fixes #3049
  • Loading branch information
finnar-bin authored Dec 16, 2024
1 parent abb239f commit 5c4c30f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/apps/release/src/app/views/ViewRelease/ViewRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ export function ViewRelease({ isContentSubpage }) {
if (searchRes?.status === 200) {
// fetch content item versions
// possibly can lazy load these when you open select
return dispatch(
fetchVersions(
searchRes.data[0].meta.contentModelZUID,
searchRes.data[0].meta.ZUID
)
);
if (!!searchRes.data?.length) {
return dispatch(
fetchVersions(
searchRes.data[0].meta.contentModelZUID,
searchRes.data[0].meta.ZUID
)
);
}
}
}
);
Expand Down

0 comments on commit 5c4c30f

Please sign in to comment.