Take two at fixing JS tests.

This commit is contained in:
Guo Xiang Tan 2017-12-15 15:45:50 +08:00
parent 5c3ef7875f
commit 91e84433ff
1 changed files with 6 additions and 1 deletions

View File

@ -193,7 +193,12 @@ export default SelectKitComponent.extend({
@computed("computedValues.[]", "computedContent.[]")
selectedComputedContents(computedValues, computedContent) {
const selected = [];
computedValues.forEach(v => selected.push(computedContent.findBy("value", v)) );
computedValues.forEach(v => {
const value = computedContent.findBy("value", v);
if (value) selected.push(value);
});
return selected;
},