Skip to content

Commit

Permalink
fix: bug autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Dec 19, 2016
1 parent c35dadf commit f550924
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli/cms/editor/handlebars/sourceAttr.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ export default function sourceAttr(obj, params) {
var str = params.display
var selected = ''
var displayName = prepareDisplay(obj, str)
var values = params.value
if(Object.prototype.toString.call(params.value) !== '[object Array]') {
values = [params.value]
}

Array.prototype.forEach.call(params.value, (pValue) => {
Array.prototype.forEach.call(values, (pValue) => {
if (isSelected(pValue, displayName, str)) {
selected = 'selected'
}
Expand Down

0 comments on commit f550924

Please sign in to comment.