mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
Fallback to using the first list if [poll] isn't present.
This commit is contained in:
@ -97,7 +97,13 @@ Discourse.PostView.reopen({
|
||||
}
|
||||
|
||||
var view = initializePollView(this);
|
||||
view.replaceElement($post.find(".poll-ui:first"));
|
||||
|
||||
var pollContainer = $post.find(".poll-ui:first");
|
||||
if (pollContainer.length == 0) {
|
||||
pollContainer = $post.find("ul:first");
|
||||
}
|
||||
|
||||
view.replaceElement(pollContainer);
|
||||
this.set('pollView', view);
|
||||
|
||||
}.on('postViewInserted'),
|
||||
|
Reference in New Issue
Block a user