Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Bug #525: Review fixes, cleanup code.
For adding to array, use '[].push' instead of '[arr.length] ='
  • Loading branch information
Glen Pike committed Oct 17, 2016
commit 14ab352f31ddb2c7dcf0152fd1fdcbdd33ece99a
6 changes: 3 additions & 3 deletions src/editors/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ Form.editors.Select = Form.editors.Base.extend({
var optgroup = $("<optgroup>")
.attr("label",option.group)
.html( this._getOptionsHtml(option.options) );
html[html.length] = optgroup[0];
html.push(optgroup[0]);
} else {
var val = (option.val || option.val === 0) ? option.val : '';
html[html.length] = $('<option>').val(val).text(option.label)[0];
html.push($('<option>').val(val).text(option.label)[0]);
}
}
else {
html[html.length] = $('<option>').text(option)[0];
html.push($('<option>').text(option)[0]);
}
}, this);

Expand Down