fix(core): sanitize optional reward description in course metadata

Use sanitizeOptionalHtml for reward.description now that the DB type
allows it to be omitted, fixing @cio/core build failures.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Rotimi Best
2026-06-16 20:56:42 +01:00
co-authored by Cursor
parent ab735505e5
commit bbf02df65b
+1 -1
View File
@@ -93,7 +93,7 @@ function sanitizeCourseMetadata(metadata: TCourse['metadata'] | undefined) {
reward: metadata.reward
? {
...metadata.reward,
description: sanitizeHtml(metadata.reward.description)
description: sanitizeOptionalHtml(metadata.reward.description)
}
: metadata.reward,
instructor: metadata.instructor