FIX: Correctly format select options for group poll by fields (#9131)
This commit is contained in:
parent
f2b95c1918
commit
763a065df9
plugins/poll/assets/javascripts/widgets
|
@ -454,7 +454,9 @@ createWidget("discourse-poll-info", {
|
|||
|
||||
function transformUserFieldToLabel(fieldName) {
|
||||
let transformed = fieldName.split("_").filter(Boolean);
|
||||
transformed[0] = classify(transformed[0]);
|
||||
if (transformed.length > 1) {
|
||||
transformed[0] = classify(transformed[0]);
|
||||
}
|
||||
return transformed.join(" ");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue