Skip to content

Commit 98f68da

Browse files
committed
chore: extract contents from description object
1 parent 0fffa7f commit 98f68da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/models/Topic.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ module.exports = {
233233
topic.usage = topic.usage.contents;
234234
}
235235

236+
if (topic.description !== null && typeof topic.description === 'object') {
237+
topic.description = topic.description.contents;
238+
}
239+
236240
topic.examples = sanitizeHtml(topic.examples, {
237241
allowedTags: ['a' ],
238242
allowedAttributes: {}

0 commit comments

Comments
 (0)