fix(orderBy): remove redundant if statement

Removed unnecessary additional conditional statement.