FIX: Correctly render title-less poll widgets (#10837)

`RawHtml` does not like receiving undefined values as `html`.
This commit is contained in:
Jarek Radosz
2020-10-06 19:27:03 +02:00
committed by GitHub
parent f4c7c7bff3
commit 34c99da205
2 changed files with 15 additions and 2 deletions

View File

@ -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(