Fixed redundancy in getTypeAHead