poll widget: Prevent blank poll options.

This commit is contained in:
Steve Howell
2018-05-31 00:08:55 +00:00
committed by Tim Abbott
parent d67c323c01
commit f1877d8fdb

View File

@@ -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);