Thank you, you were correct I was missing brackets which was causing some confusion. For reference to someone in the future looking at this, I should have brackets after the return up till && as below:   {filter: function(object){ return (object.structureType === STRUCTURE_ROAD || object.structureType === STRUCTURE_CONTAINER) && (object.hits < object.hitsMax); }