Skip to content

Commit

Permalink
Fix includes
Browse files Browse the repository at this point in the history
  • Loading branch information
onechiporenko committed Jan 18, 2017
1 parent 69f66e3 commit 14fc1a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addon/components/models-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ export default Component.extend({
let predefinedFilterOptions = get(column, 'predefinedFilterOptions');
let usePredefinedFilterOptions = 'array' === typeOf(predefinedFilterOptions);
if (usePredefinedFilterOptions) {
const types = ['object', 'instance'];
const types = A(['object', 'instance']);
const allObjects = A(predefinedFilterOptions).every(option => types.includes(typeOf(option)) && option.hasOwnProperty('label') && option.hasOwnProperty('value'));
const allPrimitives = A(predefinedFilterOptions).every(option => !types.includes(typeOf(option)));
assert('`predefinedFilterOptions` should be an array of objects or primitives and not mixed', allObjects || allPrimitives);
Expand Down

0 comments on commit 14fc1a3

Please sign in to comment.