mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:30:57 +08:00
FIX: Combobox wasn't matching selected value properly with value of 0
This commit is contained in:
parent
1886ffaff2
commit
ac3827f700
|
@ -39,7 +39,7 @@ export default Discourse.View.extend({
|
|||
var self = this;
|
||||
this.get('content').forEach(function(o) {
|
||||
var val = o[self.get('valueAttribute')];
|
||||
if (val) { val = val.toString(); }
|
||||
if (!Em.isNone(val)) { val = val.toString(); }
|
||||
|
||||
var selectedText = (val === selected) ? "selected" : "";
|
||||
buffer.push("<option " + selectedText + " value=\"" + val + "\" " + self.buildData(o) + ">" + Handlebars.Utils.escapeExpression(Em.get(o, nameProperty)) + "</option>");
|
||||
|
|
Loading…
Reference in New Issue
Block a user