Skip to content

Commit

Permalink
DIGG-509: Small update to make sure publications are shown even if no…
Browse files Browse the repository at this point in the history
… image exists
  • Loading branch information
MikaMunterud committed Jan 16, 2025
1 parent ceb440e commit 762db15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/query-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ export const getNewsItem = async (
export const toNewsPreview = (
pub: NewsItemDataFragment,
): NewsBlockItemFragment => {
if (!pub.heading || !pub.slug || !pub.publishedAt || !pub.image) {
if (!pub.heading || !pub.slug || !pub.publishedAt) {
throw new Error(`Invalid publication data for preview: ${pub.id}`);
}

Expand Down Expand Up @@ -639,7 +639,7 @@ export const getGoodExample = async (
export const toGoodExamplePreview = (
pub: GoodExampleDataFragment,
): GoodExampleBlockItemFragment => {
if (!pub.heading || !pub.slug || !pub.publishedAt || !pub.image) {
if (!pub.heading || !pub.slug || !pub.publishedAt) {
throw new Error(`Invalid publication data for preview: ${pub.id}`);
}

Expand Down

0 comments on commit 762db15

Please sign in to comment.