@ksnyde I believe that error is because somewhere in the code it is trying to treat an object as a string in some particular corner case. So I would suggest trying to carefully double check before you perform any string operations such as capitalize on anything. You might find a case where you are in fact not handed a string when you expected one.
To start I would suggest console logging the default case where you are switching on the typeOf(filter)
it may be some corner case there. After the default try placing something like this
console.log(typeOf(filter));
And watch for anything unexpected.
Are you certain that filteredContent
is guaranteed to be an array in all cases? You might want to have a check for that before you attempt the foreach. Perhaps place a debugger in there to understand what is going on.
You can always try
if (Ember.isEmpty(filteredContent)){
debugger;
}
Also, probably want to double check what is happening inside that itemsArray.map
with a console log on the item parameter.
Good luck debugging.