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:
@@ -93,7 +93,7 @@ function sanitizeCourseMetadata(metadata: TCourse['metadata'] | undefined) {
|
|||||||
reward: metadata.reward
|
reward: metadata.reward
|
||||||
? {
|
? {
|
||||||
...metadata.reward,
|
...metadata.reward,
|
||||||
description: sanitizeHtml(metadata.reward.description)
|
description: sanitizeOptionalHtml(metadata.reward.description)
|
||||||
}
|
}
|
||||||
: metadata.reward,
|
: metadata.reward,
|
||||||
instructor: metadata.instructor
|
instructor: metadata.instructor
|
||||||
|
|||||||
Reference in New Issue
Block a user