mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 20:21:25 +08:00
FIX: Correctly render title-less poll widgets (#10837)
`RawHtml` does not like receiving undefined values as `html`.
This commit is contained in:
@ -356,7 +356,9 @@ createWidget("discourse-poll-container", {
|
||||
} else if (options) {
|
||||
const contents = [];
|
||||
|
||||
contents.push(new RawHtml({ html: attrs.titleHTML }));
|
||||
if (attrs.titleHTML) {
|
||||
contents.push(new RawHtml({ html: attrs.titleHTML }));
|
||||
}
|
||||
|
||||
if (!checkUserGroups(this.currentUser, poll)) {
|
||||
contents.push(
|
||||
|
Reference in New Issue
Block a user