mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
poll widget: Prevent blank poll options.
This commit is contained in:
@@ -126,7 +126,11 @@ exports.activate = function (opts) {
|
||||
|
||||
elem.find("button.poll-comment").on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
var comment = elem.find("input.poll-comment").val();
|
||||
var comment = elem.find("input.poll-comment").val().trim();
|
||||
|
||||
if (comment === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
var data = poll_data.handle.new_comment.outbound(comment);
|
||||
callback(data);
|
||||
|
||||
Reference in New Issue
Block a user