diff --git a/og-image/api/_lib/parser.ts b/og-image/api/_lib/parser.ts index dab8591d..a335fe48 100644 --- a/og-image/api/_lib/parser.ts +++ b/og-image/api/_lib/parser.ts @@ -71,8 +71,8 @@ export function parseRequest(req: IncomingMessage) { creatorName: getString(creatorName) || 'Manifold Markets', creatorUsername: getString(creatorUsername) || 'ManifoldMarkets', creatorAvatarUrl: getString(creatorAvatarUrl) || '', - challengeAmount: getString(challengeAmount), - challengeOutcome: getString(challengeOutcome), + challengeAmount: getString(challengeAmount) || '', + challengeOutcome: getString(challengeOutcome) || '', } parsedRequest.images = getDefaultImages(parsedRequest.images) return parsedRequest diff --git a/og-image/api/_lib/template.ts b/og-image/api/_lib/template.ts index 7285bc15..5f795c58 100644 --- a/og-image/api/_lib/template.ts +++ b/og-image/api/_lib/template.ts @@ -151,10 +151,10 @@ export function getHtml(parsedReq: ParsedRequest) {
${ - challengeAmount ? 'M$' + challengeAmount : probability + challengeAmount !== '' ? 'M$' + challengeAmount : probability }
${ - challengeOutcome ? 'on' + challengeOutcome : '' + challengeOutcome !== '' ? 'on' + challengeOutcome : '' }
${probability !== '' ? 'chance' : ''}
diff --git a/og-image/api/_lib/types.ts b/og-image/api/_lib/types.ts index 3b7f9a2d..eb8b412d 100644 --- a/og-image/api/_lib/types.ts +++ b/og-image/api/_lib/types.ts @@ -18,6 +18,6 @@ export interface ParsedRequest { creatorName: string creatorUsername: string creatorAvatarUrl: string - challengeAmount: string | undefined - challengeOutcome: string | undefined + challengeAmount: string + challengeOutcome: string }